I have a string of the form:
string '["a"=>[10,20,30,40=>"Forty"],"b"=>[100,200,300,400=>"Four Hundred"],"c"=>[15]]' (length=78)
I need to convert this directly into an array as
array (size=3)
'a' =>
array (size=4)
0 => int 10
1 => int 20
2 => int 30
40 => string 'Forty' (length=5)
'b' =>
array (size=4)
0 => int 100
1 => int 200
2 => int 300
400 => string 'Four Hundred' (length=12)
'c' =>
array (size=1)
0 => int 15
I have tried parse_str and json_encpde/decode and eval, but none of them see the variable as anything other than a string. Please help!
php://memoryand then doinclude 'php://memory'json_encodeorserializethen retrieve it withjson_decodeorunserialize