title: codeigniter getting data without foreach
body: <p>I am trying to select data from two tables <BR>
  and then send it back as array to function  <BR>
  and pass that data array to my view using codeigniter.</p>
  
  <p>My array of values coming from database is like bellow, when I <code>print_r</code> it in view</p>
  
  <pre><code>Array 
  ( 
       [0] =&gt; stdClass Object 
       ( 
           [task] =&gt; Receiving Building Permit 
           [task_status] =&gt; 0 
           [date_duration] =&gt; 25.08.08 (1 day) 
           [gallery] =&gt; 1 
           [download] =&gt; 1 
           [project_name] =&gt; Investment and Development 
       ) 
       [1] =&gt; stdClass Object 
       ( 
           [task] =&gt; Back Filling 
           [task_status] =&gt; 1 
           [date_duration] =&gt; 16.11.08 - 21.11.08 (7 days) 
           [gallery] =&gt; 1 
           [download] =&gt; 1 
           [project_name] =&gt; 
           Investment and Development 
        ) 
   )
  </code></pre>
  
  <p>Actually its return two rows.
  If you notice the value of project_name in both rows are same <BR></p>
  
  <p>Now I want to print <code>project_name</code> value on top of row then I will repeat the rows with foreach.<BR></p>
  
  <p>How to get <code>project_name</code> value before foreach?</p>