Mega Code Archive

 
Categories / Php / Strings
 

A third parameter to strpos( ) that allows us to specify where to start searching from

<?     $string = "This is a strpos( ) test";     $pos = strpos($string, "i", 3);     if ($pos =  == false) {             print "Not found\n";     } else {             print "Found at $pos!\n";     } ?>