News for hackers. Stuff that matters.
Re:When in doubt, turn to _why by shaunxcode on Wednesday January 21, 2009 @10:51PM (#444322)
This is how I would approach such an issue with php. This assumes it would be run through eval or written to file and included. Obviously to make this valid php I would replace { with Array( and } with ) -- but I decided to stick to the spec above for arguments sake.

$parsed = str_replace('{', '{"', '{'.str_replace(Array('[', ']'), Array('" => {', ''), $string)) .str_repeat('}', substr_count($string, '[')+1);

Re:When in doubt, turn to _why by eru on Thursday January 22, 2009 @05:23AM (#444607)
Keep away from small children and tainted data.
Re:When in doubt, turn to _why by shaunxcode on Thursday January 22, 2009 @10:11AM (#444850)
the truth is spoken here.