I have several arrays. example:
$a = Array(
[0] => #ID_1
[1] => #ID_2
[2] => #ID_3
)
$b = Array(
[0] => ABC
[1] => cde
[2] => fgh
)
$c = Array(
[0] => 000
[1] => 111
[2] => 222
)
How to concatenate these data fields using any foreach, for, while loop?
Expected result:
$result = '#ID_1 ABC 000';
I try something like this:
$result = '';
foreach($a as $aa) {
$result .= $aa ." ";
foreach ($b as $bb) {
$result .= $bb ." ";
foreach($c as $cc) {
$result .= $cc .'<br>';
}
}
}
but the result did not meet expectations. Can anyone advise how to use foreach to chain these arrays together? Thank you. Thank you very much.