I want to explode them by different delimiters

I have a problem, I have a string, and I want to explode them by different delimiters. For example:

$one =“shop=myshop|meta={price:us_1000}{name:test}|time=16.30|date=29.11.2016” ’
And I need an array which is explode in |, {, }, and : split us_1000

$shop = “myshop”;
$name = “test”;
$price = “1000”;
$time = “16.30”;
$date = “29.11.2016”;
So I tried:

$data = array();
$resp = explode(“|”, $one);
Now I get $price={price:us_1000}{name:test}

How do I further explode $price?

you don’t. instead you parse the meta section. e.g. using preg_match_all().

it would make way more sense if the meta section looked like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.