我在写一个PhP脚本,但是对于一个过滤器我需要在一个字符串中搜索一个字符串。
这剧本我都在时刻:检查字符串是否包含单词(不是一个句子字符串)
<?php
$stringtocheck = "Schiphol-Almere C./Hilversum/Utrecht C.";
$searchfor = "Hilversum";
// do the magic stuff over here
?>
我如何拿到剧本来搜索“$ stringtocheck”“$ searchfor”?
看看[strpos()](http://php.net/strpos)。 –