title: Get the first element from var_dump($_POST) array
body: <p>This is the output I get when I used </p>
  
  <pre><code>var_dump($_POST) array(6) {
      ["merchant_id"]=&gt; string(6) "sam" 
      ["passkey"]=&gt; string(4) "1234" 
      ["amt"]=&gt; string(5) "10.00" 
      ["email"]=&gt; string(16) "sam@gmail.com"
      ["mobileNo"]=&gt; string(10) "9874563210" 
      ["orderID"]=&gt; string(6) "123456"
  }
  </code></pre>
  
  <p>My question is , how can I get the first element in this array,or the first element which is populated in <code>$_POST</code> global varablie?</p>
  
  <p>i have tried</p>
  
  <pre><code>var_dump($_POST[0])
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var_dump($_POST)[0]
  </code></pre>
  
  <p>but nothing seems working.I want to get "merchant_id",not its value</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>AS AN IDEAL CONDITION I DONT KNOW WHATS THE FIRST ELEMENT IS,I WANT TO CHECK IF</p>
  
  <pre><code>if (FIRST ELEMENT OF $_POST == 'merchant_id') {
  ....
  }
  if (first element of $_POST == 'orderID') {
  ...
  }
  </code></pre>
  
  <p>this is what Im trying to achieve.How to  get the variable name of first element of $_POST?</p>