php - Merge the array duplicate values -


this question has answer here:

array ( [0] => tirupur )  array ( [0] => coimbatore )  array ( [0] => coimbatore [1] => chennai )  array ( [0] => coimbatore [1] => chennai [2] => madurai )  array ( [0] => bangalore )  

i want final array below output

array ( [0] => tirupur [1]=>coimbatore [2]=>chennai [3]=>madurai [4]=>bangalore) 

you can combine first array in 1 array , try way

<?php $array1 = array("orange", "apple", "grape"); $array2 = array("peach", 88, "plumb"); $array3 = array("lemon", 342); $newarray = array_merge($array1, $array2, $array3);  array_unique($newarray); 

hope sure you


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -