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.
拆分以下内容以在 PHP$string中获取数组的最佳方法是什么?$cars
$string
$cars
$string = '{xa}{y}{z12}{123}{2}{aabb}'; $cars = array("{xa}","{y}","{z12}", "{123}", "{2}", "{aabb}");
我需要带括号的每个数组元素,例如:{xa}
{xa}
$string = str_replace("}{","},{",$string); $x = explode(',',$string);