mysql数据库将数组转换为谷歌地图

I've been trying to make map markers with information from my MySQL database. I am trying to do this via pulling the data from the database, inserting them into arrays and then converting them into variables that Google maps can use.

I switched around a lot of code and now it is not working any more. my mind is completely boggled at the moment and I can't look at the code in a non-confused way any more. if someone could help me with this problem, I would be most grateful!

this is the broken code: https://www.dropbox.com/s/wal7jbyuai6h3yq/Milan.php?dl=0

this is what the code was before I tried to make it more 'dynamic' https://www.dropbox.com/s/dndzmsb9pqicojt/Milan1.php?dl=0

thanks a lot in advance!!!!