title: multidimensional array in php codeigniter
body: <p>I need to build a multidimensional array from records retrieved from my database.</p>
  
  <p>Here is the code I have:</p>
  
  <pre><code>&lt;?php
  /*
   ...some code...
   */
  foreach($data['colleges'] as $college)
  {
    $college_temp[] =  $college-&gt;name; 
    $college_temp[] =  $college-&gt;abbrev;
    $college_temp[] =  $college-&gt;long_name;
    $college_temp[] =  $college-&gt;long_abbrev;
    $college_temp[] =  $college-&gt;url;
    $college_temp[] =  $college-&gt;description;
  }
  </code></pre>
  
  <p>All the records from the database are going one after the other in the array. I need to optimize this using a multidimensional array.</p>