String contains string : String Contains « String « PHP






String contains string


<?
$text = 'PHP rules!';

if (ereg('PHP', $text)) {
  echo( '$text contains the string "PHP".' );
} else {
  echo( '$text does not contain the string "PHP".' );
}
?>
           
       








Related examples in the same category