Hi.
I need to create the following array like the one below, my data is coming from a mysql query and is therefore ‘flat’.
Array
(
[0] => Array
(
[0] => padova
[1] => padova
[2] => Array
(
[baloon] =>
Latitude: %LAT%
Longitude: %LON%
[zindex] => 3
[title] => just the title
)
)
[1] => Array
(
[0] => verona
[1] => verona
[2] => Array
(
[baloon] =>
Latitude: %LAT%
Longitude: %LON%
[zindex] => 3
[title] => just the title
[onclick] => function(lat, lon){
document.getElementById("debug").innerHTML("Lat: "+lat+"\
Lon: "+lon);
}
)
)
[2] => Array
(
[0] => cesena
[1] => cesena
[2] => Array
(
[openbaloon] =>
Cheers from Cesena !!! :D
[zindex] => 3
[title] => just the title
[icon] => http://www.freakstyle.it/classes/gmapsv3/samples/img/beachflag.png
[icon_size] => 20,32
[shadow] => http://www.freakstyle.it/classes/gmapsv3/samples/img/beachflag_shadow.png
[shadow_size] => 37,32
)
)
)
I am completly stumped how to loop through my mysql result set and generate the arrays… can anyone help.
Thanks
Chris