How to remove indexes from an array?
Original Array
["Torrada" => 4,"Cachorro quente" => 1]
for
[4,1]
How to remove indexes from an array?
Original Array
["Torrada" => 4,"Cachorro quente" => 1]
for
[4,1]
The function array_values
returns all values in an array:
$Array = ["Torrada" => 4,"Cachorro quente" => 1];
$Valores = array_values($Array);
print_r($Valores);
Output:
Array
(
[0] => 4
[1] => 1
)