How to use an array variables with Google Map

I’m working on a Google Map integration project for a company who owns X-Cart online software. The project is to display all dryclean providers of 50 states in the US on the Google Map. Each state will have multiple city and each city will include multiple dryclean providers who register to the service.

When a customer clicks on a location on the map, it will zoom in to that exact location. At the same time, the information about that laundry provider will be displayed on Google Map. Sine this map will be for all hotel subscribers, if a customer click on a particular hotel, a popup of room selection box will appear. When customer select a room #, it will take him/her to a purchase page which will allow him/her to add laundry items in the cart and check out with credit card on a secure SSL server.

This is a part of a Smarty sample codes how you embed multiple laundry provider information into a Google Map, given $hotel_lists is an array of all hotels across the United States. This data can be retrieved from a any database such as MySQL or MSSQL or Oracle.

var json = [

 {foreach from=$hotel_lists key=index item=ht}
 {"locationID":"{$index}","address":"{$ht.address}","state":"{$ht.us_state|upper}"
,"city":"{$ht.city|capitalize}","lat":"{$ht.map_lat}","lon":"{$ht.map_lon}"
,"companyName":"{$ht.membership}","info":"<table><tr>
<td valign=top><u>{$ht.membership}<\/u><br>{$ht.address}<\/td><\/tr>
<\/table>","abbreviation":"k"},
 {/foreach}}

 ];