title: How can I Display Object PHP
body: <p>I have code like this :</p>
  
  <pre><code>$dataRecord1 = $client-&gt;GetRecord($token, $table, $filter);
  echo "&lt;pre&gt;"; print_r($dataRecord1); echo "&lt;/pre&gt;"; 
  foreach ($dataRecord1-&gt;result as $drm) {
      echo "&lt;tr&gt;&lt;td&gt;$drm-&gt;id&lt;/td&gt;
                &lt;td&gt;$drm-&gt;nm&lt;/td&gt;
            &lt;/tr&gt;";
  }
  </code></pre>
  
  <p>if i use print_r($dataRecord1) will display like this :</p>
  
  <pre><code>stdClass Object
  (
      [error_code] =&gt; 0
      [error_desc] =&gt; 
      [result] =&gt; stdClass Object
          (
              [id] =&gt; 1
              [nm] =&gt; Josh
          )
  
  )
  </code></pre>
  
  <p>but if with foreach doesn't display anything. I want display like this :</p>
  
  <pre><code>----------------
  | id  |  nm    |
  ----------------
  | 1   | Josh   |
  ----------------
  </code></pre>
  
  <p>Can anyone help me ?</p>