獲取指定字符串前的內容
$AAA = '123_45678';
$result = substr($AAA,0,strrpos($AAA,"_"));
echo $result;//輸出123
獲取指定字符串後的內容
$AAA = '123_45678';
$result = substr($AAA,strripos($AAA,"_")+1);
echo $result;//輸出45678
獲取指定字符串前的內容
$AAA = '123_45678';
$result = substr($AAA,0,strrpos($AAA,"_"));
echo $result;//輸出123
獲取指定字符串後的內容
$AAA = '123_45678';
$result = substr($AAA,strripos($AAA,"_")+1);
echo $result;//輸出45678