I have this in PHP:
$data = array("test"=>array("abc"=>"xyz"));
I want to append ‘data:‘ with array values, so output will be ‘data:xyz‘ for that $data array.
Its just a sample. How can I do this with multi dimension arrays. i.e; appending string with multi dimension array values ? Can I do with persistent values in same array so I can re-use this ?
If you don’t care about human-readability and just want to serialise an Array for later use:
If you’re trying to modify the original array such that the text “data:” is prepended to every value in the Array on every level: