PDA

View Full Version : combine numbers in arrays


harmor19
05-31-2007, 10:06 AM
I have two arrays.

$array1 = array(1,5,8);
$array2 = array(2,7,5);

What I want to do is combine the two fives so there is only one five.

Dismounted
05-31-2007, 11:32 AM
$arrays = array_unique(array_merge($array1, $array2));

harmor19
05-31-2007, 07:58 PM
Thanks.