title: Pass php variable (place name) to google map (javascript) to mark the location
body: <p><strong>Anyone Give me solution on how to put the $location variable to jscript to get the location on Google Map. And what should be the value of location (location name or postal code ) .</strong>
  Here is the code :</p>
  
  <pre><code>&lt;?php 
  $location=$_GET["clocation"]; //fetched clocation from database in previous page
  ?&gt;
  
  &lt;div id="map" style="width:100%;height:500px"&gt;&lt;/div&gt;
  &lt;script&gt;
  function myMap() {
  var myCenter = new google.maps.LatLng(23.6943,90.3444); //Here i want to put my location value to get location on google map
    var mapCanvas = document.getElementById("map");
  
    var mapOptions = {center: myCenter, zoom: 7, panControl: true,
      zoomControl: true,
      mapTypeControl: true,
      scaleControl: true,
      streetViewControl: true,
      overviewMapControl: true,
      rotateControl: true };
    var map = new google.maps.Map(mapCanvas, mapOptions);
    var marker = new google.maps.Marker({position:myCenter});
    marker.setMap(map);
  
  }
  &lt;/script&gt;
  &lt;script src="https://maps.googleapis.com/maps/api/js?key=&lt;hidden&gt;&amp;callback=myMap"&gt;&lt;/script&gt;
  </code></pre>