Q:

How to merge multidimensional arrays in php

I have the following case in php
$one = array('one' => 1,  2 => array('intro'=> 'something', 'short' => 'short')); 
$two = array('intro' => 'something_new');
$three = array_merge($one,$two);

what I wanted to do is to change the one[2][intro] to two[intro]
what it does is append the "two" array into the "one"
How I could change the value of the first array with the second ones by knowing only the key but not in which level is this key?

A:

What about :
$new_two = array_merge($one[2],$two)
$one[2] = $new_two;

A:

You could do
$one[2] = array_merge($one[2],$two);

