PHP/String/String Contains

Материал из Web эксперт
Перейти к: навигация, поиск

String contains string

   <source lang="html4strict">

<? $text = "PHP rules!"; if (ereg("PHP", $text)) {

 echo( "$text contains the string "PHP"." );

} else {

 echo( "$text does not contain the string "PHP"." );

} ?>

      </source>