I have 2 arrays.
First array:
$array = array( 'a' => 'b', 'b' => 'c', 'c' => 'd', );
Second array:
$array = Array ( [a] => Array ( [0] => b [1] => h ) [b] => c [c] => d [h] => m )
I need to change this array, for example
First array:
Array ( [a] => Array ( [b] => Array ( [c] => Array ( [d] => d ) ) ) )
Second array:
Array ( [a] => Array ( [b] => Array ( [c] => Array ( [d] => Array ( ) ) ) [h] => Array ( [m] => Array ( ) ) ) )
Sirwilliam's answers helped solve the problem with the first array. and I need it for a multidimensional array. Help solve the problem. thanks in advance
arrays php
Jegan
source share