<?php $str = 'hello world'; //获取位置 $world = strpos($str,'world'); echo $world; 转载于:https://www.cnblogs.com/deneyZhao/p/5474451.html