I want to convert this string:
"B=val4, A = [val1, key=val2, val3], C=val5"
To this string:
"B=val4,A[]=asdas&A[key]=val2&A[]=val3,C=val5"
So, it can be used with parse_str()
How it must be done using preg_replace or preg_replace_callback?
preg_replace is preferable.
A = [val1, key=val2, val3]
? A string? – Felix Kling Aug 5 '12 at 10:59