Hello,
I'm trying to combine the values of two arrays. But I don't know how to do it exactly.
I have two arrays:
[1, 2] and [3, 4, 5]
And I want to combine them so I can get this array: [13, 14, 15, 23, 24, 25] :confused: How I can do that?
Printable View
Hello,
I'm trying to combine the values of two arrays. But I don't know how to do it exactly.
I have two arrays:
[1, 2] and [3, 4, 5]
And I want to combine them so I can get this array: [13, 14, 15, 23, 24, 25] :confused: How I can do that?
PHP Code:$array1 = array(1, 2);
$array2 = array(3, 4, 5);
$final = array();
foreach($array1 as $a1)
foreach($array2 as $a2)
$final[] = $a1 . $a2;
print_r($final);
Thank you very much. :)