1
I’d like to combine two arrays
($a
and $b
) in such a way $c = $a[0]$b[0],$a[1]$b[1]...$a[n]$b[n]
how to proceed there is a function I tried to do with foreach
but without success.
$array1 = array("laranja", "morango");
$array2 = array("s1", "s2");
$result = array_combine($array1, $array2);
In case I would like as a result:
['laranja', 's1', 'morango', 's2']
Do you want the result this way? "orange", "S1", "strawberry", "s2"?
– Wictor Chaves
even in this way
– Adilmar Coelho Dantas