When I do var_dump($punkty);
I got something like this:
array(1)
{
[0]=> array(4)
{
["id"]=> string(2) "28"
["mapa"]=> string(97) "a:3s:3:"lat";s:17:"49.21103723075132";s:3:"lng";s:18:"22.330280542373657";s:4:"zoom";s:2:"17";}"
["miasto"]=> string(5) "Cisna"
["nazwa_obiektu"]=> string(44) "Cisna - noclegi u Mirosławy w Bieszczadach"
}
}
When i do:
foreach ($punkty['mapa'] as $item)
{
echo $item;
}
I get
Invalid argument supplied for foreach()
How to solve it?
I think you’re trying to do this: