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.
我有字符串:“33a49bc12d”,我想要这个数组 0 => 33、1=>a、2=>49、3=>bc、4=>12、5=>d。这不是我的本事。你可以帮帮我吗?谢谢
你可以从这个开始:
<?php $text = "33a49bc12d"; preg_match_all("/([\d]+|[a-z]+)/i", $text, $out); print_r($out[0]); ?> Array ( [0] => 33 [1] => a [2] => 49 [3] => bc [4] => 12 [5] => d )