title: Show Markers on google map by using data from mysql in php
body: <p>I attached image here for an example.<a href="https://i.stack.imgur.com/bXhQq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bXhQq.png" alt="I want that the location with marker and it&#39;s description will show something like this in map but from MySQL database with php. so, if some new stores is added then i quickly update it from DB."></a></p>
  
  <p>Currently I show locations on map in a HTML page with static code like,</p>
  
  <p>Java scripts to load map on page :</p>
  
  <pre><code>&lt;script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"&gt; &lt;/script&gt;
  
   &lt;script type="text/javascript"&gt;
     var map;
     var centerPos = new google.maps.LatLng(37.0902,95.7129);
     var zoomLevel = 4;
     function initialize() 
      {
        var mapOptions = 
        {
         center: centerPos,
         zoom: zoomLevel
        };
        map = new google.maps.Map( document.getElementById("map-canvas"), mapOptions );
      }
      google.maps.event.addDomListener(window, 'load', initialize);
    &lt;/script&gt;
  </code></pre>
  
  <p>Google map Div :</p>
  
  <pre><code>    &lt;div id="Community-Google-Map-Div"&gt;
            &lt;div class="wrap"&gt;
              &lt;div id="map-canvas"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Java scripts to load Different locations :</p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
  
      function LocateSales() 
      {
        var map;
        var centerPos = new google.maps.LatLng(22.4700,77.5667);
        var zoomLevel = 4;
  
        var mapOptions = 
        {
          center: centerPos,
          zoom: zoomLevel
        };
        map = new google.maps.Map( document.getElementById("map-canvas"), mapOptions );
  
        var locations = [ ['USA', 50.0000, 79.7800],
                          ['Second', 82.9667, 77.5667],
                          ['Third', 78.4700, 77.0300]
                        ];
  
            for (i = 0; i &lt; locations.length; i++) {  
            marker = new google.maps.Marker({
        position: new google.maps.LatLng(locations[i][1], locations[i][2]),
        title: locations[i][0],map: map });
         }
    }
     google.maps.event.addDomListener(window, 'load', initialize);
    &lt;/script&gt;
  </code></pre>
  
  <p>So, Please tell me how to solved this !</p>