Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Sep 5th, 2010 | Syntax: PHP | Size: 0.25 KB | Hits: 22 | Expires: Never
Copy text to clipboard
  1. foreach($this->db->get('Users')->result AS $key => $row)
  2. {
  3.         $row['groups'] = array();
  4.         foreach($this->dv->get_where('Groups', "UsersId = $row->Id")->result AS $key2 => $row2)
  5.         {
  6.                 $row['groups'][] = $row2->Id;
  7.         }
  8.         $data[] = $row;
  9. }
  10.  
  11. return $data;