2
How I Group Array Results out of Loop into a Single Variable
- In the example below the result that is inside the loop is correct but I need that same result to appear on the outside of the loop,
How can I make it work
foreach ($ids_cotados as $value) {
echo $ids_cotados = $value.','; // 520, 130, 60, 700,
}
echo $ids_cotados; // aqui da erro só pega 520,
vc want an array or string at the end?
– rray
I want it to come out like 520, 130, 60, 700
– Fabio Henrique