【发布时间】:2015-12-07 12:40:17
【问题描述】:
我正在编写一个 PhP 脚本,但对于过滤器,我需要在字符串中搜索字符串。
这是我目前拥有的脚本:
<?php
$stringtocheck = "Schiphol-Almere C./Hilversum/Utrecht C.";
$searchfor = "Hilversum";
// do the magic stuff over here
?>
如何让脚本在“$stringtocheck”中搜索“$searchfor”?
【问题讨论】:
-
看看strpos()。