My url slug is like below
/page-1/block-1/subpage
Now I want to search the slug for the word 'block'
I used stripos but it didn't give me the right output.
$pos2 = stripos("block", $row->uri);
if ($pos2 == true) {
echo "We found block in '$row->uri' at position $pos2";
}
$pos2
is always false here.
Any help is highly welcomed. Thanks in advance.