1
I have a random array that returns several keys and I need to manipulate all the returned data, the problem is that they vary depending on the occasion, I want to display this organized information in HTML, but there are cases where this array returns more values, or even nothing or keys are missing or more keys are added. That way I can not specify in the code what information goes in which place because if the index does not exist it will be empty and will generate a Warning. How can I handle an array like this ? example:
Have you tried with
foreach($vizinho as $indice => $valor)
?– Woss
Related: What are the ways to iterate an array in PHP (without foreach)?
– Woss