title: How to pick specificed values from array in PHP?
body: <p>This is variable <strong>$msg</strong> returns this output from paypal response:</p>
  
  <pre><code>Array ( 
  [mc_gross] =&gt; 7000.00 
  [protection_eligibility] =&gt; Ineligible 
  [address_status] =&gt; unconfirmed 
  [payer_id] =&gt; SEVC3VYVYC8NS 
  [tax] =&gt; 0.00 
  [address_street] =&gt; Minicraft 5 
  [payment_date] =&gt; 13:29:34 Jun 10, 2016 PDT 
  [payment_status] =&gt; Pending 
  [charset] =&gt; windows-1252 
  [address_zip] =&gt; 11580 
  [first_name] =&gt; Joe
  [payer_email] =&gt; joe@hiskaya.com
  )
  </code></pre>
  
  <p>I tried to get <strong>$msg['payment_date']</strong> and <strong>$msg['payer_email']</strong>, then they return empty blank strings in email body, I don't know why.</p>
  
  <p>EDITED FOR SOMEONE WHO WANTS REVELANT CODE:</p>
  
  <p>I created my own lib which it can send email, it's my own function, not revelant.</p>
  
  <pre><code>$msg = print_r($request, true);
  $pay_date = $msg['payment_date'];
  
      sendMail([
        'subject' =&gt; 'Payment has been received',
        'body' =&gt; "Date: ".$pay_date.",
        'to_email' =&gt; 'someone@ail.com',
        'to_name' =&gt; 'Joe',
      ]);
  </code></pre>