title: Getting values from an array php
body: <p>I have this array:</p>
  
  <pre><code>result script loadedArray
  (
      [2015-06] =&gt; Array
      (
          [nb_uniq_visitors] =&gt; 12
          [nb_users] =&gt; 0
          [nb_visits] =&gt; 12
          [nb_actions] =&gt; 51
          [nb_visits_converted] =&gt; 0
          [bounce_count] =&gt; 4
          [sum_visit_length] =&gt; 1574
          [max_actions] =&gt; 22
          [bounce_rate] =&gt; 33%
          [nb_actions_per_visit] =&gt; 4.3
          [avg_time_on_site] =&gt; 131
      )
  
  )
  </code></pre>
  
  <p>And I want to be able to access it as an object How can I do that?  I have</p>
  
  <pre><code>$object = new stdClass();
  
  foreach ($arrayme as $key =&gt; $value) {
      $object-&gt;$key = $value;
  }
  </code></pre>
  
  <p>But can't do <code>$object-&gt;2015-06-&gt;nb_visits</code>  to access the array object.</p>