How to convert a string $string = 'array(array("a"=>"content"))';
(<-- this is string)
into array like this:
array(1) { [0]=> array(1) { ["a"]=> string(7) "content" } }
I am going to build a function to run serialize online:
Input: $string = 'array(array(1))'; echo serialize($string);
Result: a:1:{i:0;a:1:{i:0;i:1;}}
NOT s:16:"array(array(1)))";
You call: $returnValue = serialize('array(array(1))');