Please help me, i have a case that must be solve immediately due to strict deadline.. :( I have an idea using preg_match or preg_split to solve this, and had tried so many way to use it but still not understand how to use it. Maybe someone could guide me, about this case so i could get more understanding about how to use preg_match or preg_split.
//from this string
$temp = "{foo:bar,bar:foo},{_id:1,nama:1,nim:1}";
//how to assign it to array so the result will be like this
Array
(
[0]=>foo:bar,bar:foo
[1]=>_id:1,nama:1,nim:1
)
//also the second string
$temp2 = "_id:1,nama:1,nim:1";
//how to assign it to array so the result will be like this
Array
(
[0] => _id
[1] => nama
[2] => nim
)
Thank you for your guidance and the help.. :)