title: Passing array to __construct
body: <p>I'm having the following array :</p>
  
  <pre><code>$allZones = array (
      'header'    =&gt;  array('div1', 'div2'),
      'content'   =&gt;  array('div3', 'div4')        
  );
  </code></pre>
  
  <p>I'm using it to create instances the following way:</p>
  
  <pre><code>foreach($allZones as $newZoneId =&gt; $newZoneSubs) {
      $newZone = new zone($newZoneId, $newZoneSubs);
  }
  </code></pre>
  
  <p>The constructor for the 'zone' class looks as follows:</p>
  
  <pre><code>public function __construct($newZoneId, array $newZoneSubs) {
      $this-&gt;zoneId = $newZoneId;
  
      if(is_array($newZoneSubs)) {
          foreach($newZoneSubs as $newZoneSub) {
                  $this-&gt;zoneSubs[] = new zone($newZoneSub, '');
          }
      }
      else {
          echo "1: " . $newZoneSubs;
      }
  }
  </code></pre>
  
  <p>for some reason the $newZoneSubs is empty.</p>
  
  <p>Can anyone tell me why?</p>