Merge multiple arrays to form a new array, what php function? -
$image = array( 'src' => array( 0 => 'zero', 1 => 'one', 2 => 'two', ), 'width' => array( 0 => 'zero', 1 => 'one', 2 => 'two', ), 'height' => array( 0 => 'zero', 1 => 'one', 2 => 'two', ), );
i trying merge these array elements form following array.
$image = array( array( 'src' => 'zero', 'width' => 'zero', 'height' => 'zero' ), array( 'src' => 'one', 'width' => 'one', 'height' => 'one' ), array( 'src' => 'two', 'width' => 'two', 'height' => 'two' ), );
can suggest suitable php function? i'm not trying use foreach
loop here.
start array_merge_recursive() , go there.
Comments
Post a Comment