I have the following line of code:
$valores = implode(", ", array_values($dados));
and by giving var_dump(array($valores));
the following information is returned:
array (1) { [0] = > string (26) "Igor, Teste, [email protected]" }
However, I need each item to be returned in a new array (in this case, an array with 3 items).
That is, it would create an array of that other array($valores)
.
What is the best way to do this?
EDITED
I've tried to use explode
:
$arrValores = array($valores);
$itemValores = explode(", ", $arrValores);
foreach($itemValores as $item) {
$item;
}
var_dump($item);
However, what is returned to me is:
string (5) "Array"
Thanks!