title: Extracting value from SOAP/JSON
body: <p>I have a JSON response, and I have tried many means to extract the value that has (APPROVED), but it is difficult</p>
  
  <p>Here is the Response:</p>
  
  <p>PHP, JSON</p>
  
  <pre><code>2028000NGNDepositSecure3D{"lkpTransactionId":"1100037249","lkpErrorNo":"0","lkpErrorDescription":"Approved","lkpEnrolled":"Y","lkpEciFlag":"02","authSend":"Y","authErrorNo":"0","authErrorDescription":"Approved","authCavv":"jHyn+7YFi1EUAREAAAAvNUe6Hv8=","authXid":"O0KGgwbJpRpdB8cw4OUfee34PkA=","authEciFlag":"02","authPAResStatus":"Y"}Successful64086914117475714319752028000052019545301******41541100037249MASTERCARDSamuel Adah00SuccessfultrueSUCCESSFULPAYMENT
  </code></pre>
  
  <p>I would like to get each results in an array or string.</p>
  
  <p>THank you guys.</p>
  
  <p>UPDATE:</p>
  
  <p>I was able to follow your suggestion and I am left with the following results: </p>
  
  <pre><code>array(12) {
    ["lkpTransactionId"]=&gt;
    string(10) "1100037249"
    ["lkpErrorNo"]=&gt;
    string(1) "0"
    ["lkpErrorDescription"]=&gt;
    string(8) "Approved"
    ["lkpEnrolled"]=&gt;
    string(1) "Y"
    ["lkpEciFlag"]=&gt;
    string(2) "02"
    ["authSend"]=&gt;
    string(1) "Y"
    ["authErrorNo"]=&gt;
    string(1) "0"
    ["authErrorDescription"]=&gt;
    string(8) "Approved"
    ["authCavv"]=&gt;
    string(28) "jHyn+7YFi1EUAREAAAAvNUe6Hv8="
    ["authXid"]=&gt;
    string(28) "O0KGgwbJpRpdB8cw4OUfee34PkA="
    ["authEciFlag"]=&gt;
    string(2) "02"
    ["authPAResStatus"]=&gt;
    string(1) "Y"
  } 
  </code></pre>
  
  <p>Getting value of authErrorDescription is really difficult for me.</p>
  
  <p>I tried this:</p>
  
  <pre><code>foreach($res as $user){ 
        echo $user[8]['authErrorDescription'].'&lt;br/&gt;';
        //echo $user[0]-&gt;authErrorDescription;
     }
  </code></pre>
  
  <p>But result did not show properly. </p>