Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.16 KB | None | 0 0
  1. $array = null;
  2.     foreach ($row->result_object as $row) {
  3.         if($row->parent == ""){
  4.             $array[$row->id] = $row;
  5.         }else{
  6.             $array[$row->parent][] = $row;
  7.         }
  8.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement