2
How to remove indexes from an array?
Original array
["Torrada" => 4,"Cachorro quente" => 1]
for
[4,1]
2
How to remove indexes from an array?
Original array
["Torrada" => 4,"Cachorro quente" => 1]
for
[4,1]
3
The function array_values
returns all values of an array:
$Array = ["Torrada" => 4,"Cachorro quente" => 1];
$Valores = array_values($Array);
print_r($Valores);
Exit:
Array
(
[0] => 4
[1] => 1
)
And it worked out noobsaibot
In this case you will only inform array_values($info['data']);
was the print_r who was accusing the error... thank you
Browser other questions tagged php array
You are not signed in. Login or sign up in order to post.
In PHP would not be:
["Torrada" => 4,"Cachorro quente" => 1]
?– NoobSaibot
@Correct noobsaibot
– Willian