截取字符后面的内容
strripos函数获取&字符串后面的内容
$number = '1111&0123456'; $result = substr($number,strripos($number,"&")+1); echo $result;
输出0123456
截取字符前面的内容
strripos函数获取&字符串前面的内容
$test = '1111&0123456'; $result = substr($test,0,strrpos($test,"&")); echo $result;
输出1111