title: How can I get the information from "coordinates" and save it in a PHP variable?
body: <p>I'm looking for some ways but I'm having a lot of difficulty ... I just need the information that is in &quot;coordinates&quot; and put it in a PHP</p>
  <pre><code>&lt;script&gt;
          mapboxgl.accessToken = 'MY_KEY :3';
      
          var client = new MapboxClient(mapboxgl.accessToken);
      
          var address = 'white house';
          var test = client.geocodeForward(address, function(err, data, res) {
      
      
            var coordinates = data.features[0].center;
   
            document.write(coordinates);
            //console.log(coordinates);
       
            var map = new mapboxgl.Map({
              container: 'map',
              style: 'mapbox://styles/mapbox/streets-v10',
              center: coordinates,
              zoom: 14
            });
            new mapboxgl.Marker()
              .setLngLat(coordinates)
              .addTo(map);
          });
      
        &lt;/script&gt;
      &lt;/head&gt;  
      &lt;body&gt;
        &lt;div id='map'&gt;&lt;/div&gt;
      &lt;/body&gt;
  </code></pre>
  <p>A very simple example is this</p>
  <pre><code>&lt;?php $coord = 'coordinates'; ?&gt;
  </code></pre>