php - How to make array construction? -


i have problem. have 2 arrays , need put 1 other this:

array('1'=>1,'2'=>2,'3'=>array()); 

can advise how solve it?

if first array

$first =  array('1'=>1,'2'=>2) 

and second is

$second =  array() 

then add in

$first[] = $second 

if second is

$second[3] = array(); 

then want array_merge

$first = array_merge($first,$second) 

there sorts of array functions on left in link, come in handy.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -