Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个这样的字符串
$value="1000,00+1000x522";
我需要从$value
$value
$string1="1000,00"; $string2="1000x522";
但是这个字符串 $value 可以有不同的值 long,但总是+将是第一个和第二个新字符串的分隔符?
使用list()和explode()
list()
explode()
$value="1000,00+1000x522"; list($string1, $string2) = explode('+', $value);