Mega Code Archive
Categories
/
Php
/
Strings
Strpos( ) will return false (as opposed to -1)
$string = "This is a strpos( ) test"; $pos = strpos($string, "This"); if ($pos = == false) { print "Not found\n"; } else { print "Found!\n"; } ?>