find word php code example
Example 1: php find if string contains
if (strpos($string, 'substring') !== false) {
// do stuff
}
Example 2: strpos in php
<?php
// We can search for the character, ignoring anything before the offset
$newstring = 'abcdef abcdef';
$pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
?>