I have a multi dimensional array.
I want to take subarray 'style' and take the keys and put them into a new array.
$tab[$countTab][$countNode]['style']
here is the array:
array(7) {
["Name"]=>
string(5) "Basic"
["value"]=>
string(4) "0763"
["category"]=>
string(4) "Info"
["Order"]=>
int(3)
["class"]=>
array(3) {
[0]=>
string(3) "pos"
[1]=>
string(2) "first"
[2]=>
string(0) ""
}
["style"]=>
array(4) {
["top"]=>
string(2) "15"
["left"]=>
string(2) "20"
["right"]=>
string(2) "55"
["width"]=>
string(2) "200"
}
["nav"]=>
array(4) {
["up"]=>
string(0) ""
["right"]=>
string(0) ""
["down"]=>
string(0) ""
["left"]=>
string(0) ""
how to get this result?.
> $new_array = array( 'top' => '15', 'left' => '20', 'right' => '55', 'width' => '200')