I am looking for a function that will convert this array:
array(1) {
["a"]=>
array(2) {
["b"]=>
int(1)
["c"]=>
string(5) "hello"
}
}
into something like:
array(2) {
["a[b]"]=>
int(1)
["a[c]"]=>
string(5) "hello"
}
I.e. to "serialize" structured array so that I can easily put it to HTML form as hidden fields and when I read it back from the $_POST
, I get exactly the same structure! Is there any PHP built-in function for that?