php - Why strpos returns false in this case? -
i'm trying find out if string contains string.
here code
$insta_share_link='https://instagram.com/p/bir-knbgyt-'; if(strpos($insta_share_link,'instagram.com/p/')) { //some code... }
when wrote echo function see strpos returning, showed false.
why?
the needle has 'www.', haystack ('https://instagram.com...') not.
the entire string 'www.instagram.com/p/' must found in haystack strpos
return position of string.
Comments
Post a Comment