アーカイブ

‘含まれる’ タグのついている投稿

PHP strstr stristr ある文字列が含まれるかどうか調べる

2010 年 6 月 11 日 admin コメントはありません

$string = ‘Hello World!’;
if(stristr($string, ‘earth’) === FALSE) {
echo ‘”earth” not found in string’;
}
// 出力は “earth” not found in string となります

参照元:http://www.php.net/manual/ja/function.stristr.php

カテゴリー: 雑記 タグ: , , ,