PHP's preg_split regex help?

Mark

New member
Okay so I'm trying to break a string into an array. The string I'm given is something like this:

Numbers:{1,2,3},Letters:{a,b,c},Fruit:{apple,orange,banana}

What would the regex be to break that into an array? So it should be:

$array['Numbers'] = array('1', '2', '3')
$array['Letters'] = array('a', 'b', 'c')
$array['Fruit'] = array('apple', 'orange', 'banana')
 
Back
Top