在PHP中,可以使用以下函数来区分大小写查找:
$string = "Hello World";
$position = strpos($string, "W");
echo $position; // 输出 6
$string = "Hello World";
$position = stripos($string, "w");
echo $position; // 输出 6
$string = "Hello World";
$substring = strstr($string, "W");
echo $substring; // 输出 World
$string = "Hello World";
$substring = stristr($string, "w");
echo $substring; // 输出 World
这些函数可以帮助你在PHP中区分大小写进行查找。
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站