php代碼段:php
$str = "23-qwewwuioakoji"; //這裏分別要截取以「-」分隔的先後兩個不定長的字符串 list($number, $random) = explode("-", $str); echo $number; echo $random;
output:dom
23ui
qwewwuioakojicode