Sep 11, 2007 #1 casabella Programmer Joined Aug 30, 2007 Messages 59 Location US Given variable named $var and a string "A~B~C~D~E", how can I find if $var content is contained within string? Thanks, Jose Lerebours
Given variable named $var and a string "A~B~C~D~E", how can I find if $var content is contained within string? Thanks, Jose Lerebours
Sep 11, 2007 Thread starter #2 casabella Programmer Joined Aug 30, 2007 Messages 59 Location US OK - I found stripos in http://us3.php.net/manual/en/function.stripos.php It looks like it might do the trick! Thanks, Jose Upvote 0 Downvote
OK - I found stripos in http://us3.php.net/manual/en/function.stripos.php It looks like it might do the trick! Thanks, Jose
Sep 11, 2007 #3 jpadie Technical User Joined Nov 24, 2003 Messages 10,094 Location FR yup. that works but if you just want to find out whether a string is in another string then strstr or stristr is quicker. http://fr3.php.net/stristr Upvote 0 Downvote
yup. that works but if you just want to find out whether a string is in another string then strstr or stristr is quicker. http://fr3.php.net/stristr