title: getting values from stdClass Object
body: <p>I try to get values of stdClass Object into php variables. And i looked for other solutions but i couldn't success. Here is my result.</p>
  
  <pre><code>    stdClass Object
  (
      [messages] =&gt; Array
          (
              [0] =&gt; stdClass Object
                  (
                      [apiMessageId] =&gt; db55468cdb274551b9e18c973ec780f4
                      [accepted] =&gt; 1
                      [to] =&gt; 1111111
                      [error] =&gt; 
                  )
  
          )    
      [error] =&gt; 
  )
  </code></pre>
  
  <p>I want to get only "apiMessageId" section but as i said i couldn't get this. I tried "$object->messages[0]->apiMessageId;" but no results on the screen. Anyone to help me please?</p>
  
  <p>and this is my php code for request.</p>
  
  <pre><code>        function Conn($url){
          $curl = curl_init();
          curl_setopt($curl, CURLOPT_URL, $url);
          curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
          $cikti = curl_exec($curl);
          curl_close($curl);
          return str_replace(array("\n","\t","\r"), null, $cikti);
      }
  
  $url1 = "https://platform.clickatell.com/messages/http/send?apiKey=xxx&amp;to=xxx&amp;content=Test+message+text";
  $Conn = Conn($url1);
  $res = json_decode($Conn);
  
  echo "&lt;pre&gt;";
  print_r($res);
  echo "&lt;/pre&gt;";
  </code></pre>