1、strstr
截取某个字符前的字符:
echo strstr("123456789","5",true);//输出:1234
截取某个字符后的字符:
echo strstr("123456789","5");//输出:6789