title: Coinmarketcap API call with PHP and choose data set with slug
body: <p>I tried to do my first API calls which worked finally with help from this great users here in this community. Thanks again. I want to choose <em>data[1]</em> or the currency with <em>symbol</em>. So i could use a $variable from my CMS. Maybe someone can show me a way how i can change this call to symbol. Here is my API call.</p>
  <pre><code>$url = &quot;https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest&quot;;
  
  $headers = [
    'Accepts: application/json',
    'X-CMC_PRO_API_KEY: ___YOUR_API_KEY_HERE___'
  ];
  
  $request = &quot;{$url}&quot;; // create the request URL
  
  $curl = curl_init(); // Get cURL resource
  // Set cURL options
  curl_setopt_array($curl, array(
    CURLOPT_URL =&gt; $request,            // set the request URL
    CURLOPT_HTTPHEADER =&gt; $headers,     // set the headers 
    CURLOPT_RETURNTRANSFER =&gt; 1         // ask for raw response instead of bool
  ));
  
  $response = curl_exec($curl); // Send the request, save the response
  $json = json_decode($response);
  curl_close($curl); // Close request
  
  $price = $json-&gt;data[1]-&gt;quote-&gt;USD-&gt;price; echo $price;
  </code></pre>