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);