title: get value within object in an array
body: <p>I have an array, containing an object. I need the value of a property of the first object but somehow I get an empty value.</p>
  
  <p>My array <code>$params</code> (from print_r) looks like this:</p>
  
  <pre><code>Array
  (
  [newOrderStatus] =&gt; OrderState Object
      (
          [name] =&gt; Canceled
          [template] =&gt; order_canceled
          [send_email] =&gt; 1
          ...
  </code></pre>
  
  <p>Cut off here, there are two more objects in this array.</p>
  
  <p>Now if I do: <code>echo $params[0]-&gt;name</code> I get an empty result.</p>
  
  <p>Also tried <code>print_r($params[0], true);</code>, empty result.</p>
  
  <p>Also tried, empty result:</p>
  
  <pre><code>$status = $params[0];
  echo $status-&gt;name;
  </code></pre>
  
  <p>What am I doing wrong here?</p>
  
  <p>Thanks in advance</p>