PHP: 文字列の検索
置換と似たような感じで簡単です。
$string = "asdfhogeasdf"; if(preg_match("/hoge/",$string);){ echo "true"; }
- 作者: Kevin Tatroe,Peter MacIntyre,Rasmus Lerdorf,高木正弘
- 出版社/メーカー: オライリージャパン
- 発売日: 2014/03/25
- メディア: 大型本
- この商品を含むブログ (4件) を見る
置換と似たような感じで簡単です。
$string = "asdfhogeasdf"; if(preg_match("/hoge/",$string);){ echo "true"; }