title: WHM cPanel JSON/PHP API printing array key issue
body: <p>I'm using WHM/cPanel's API to create accounts for users via PHP. I've got all the cURL options working to send the correct URL string to the server etc and the accounts are made properly so that side of things is all working fine. </p>
  
  <p>What I need to do now is be able to print out a proper response message, rather than it just dumping all the data to the screen, as this is intended for use by general users who won't need to see all the nameserver, DNS etc. information that is done in the background.</p>
  
  <p>The JSON result has a <code>statusmsg</code> key in the outputted array, but I'm not sure how to print it out.</p>
  
  <p>This is the result with an error:</p>
  
  <pre><code>$result = json_decode($curl_response, true);
  </code></pre>
  
  <p>(From a var_dump)</p>
  
  <pre><code>object(stdClass)#1 (1) {
      ["result"]=&gt; array(1) {
          [0]=&gt; object(stdClass)#2 (4) {
              ["options"]=&gt; NULL
              ["rawout"]=&gt; NULL
              ["statusmsg"]=&gt; string(55) "Sorry, a passwd entry for that username already exists."
              ["status"]=&gt; int(0)
          }
      }
  }
  </code></pre>
  
  <p>I've tried to do <code>echo $result-&gt;result-&gt;statusmsg;</code> but it just comes up with a blank page, so I'm not sure what I'm doing wrong or if there's another way to access the status message to I can print it the the users in a more friendly way.</p>
  
  <p>Any help would be grand!</p>