Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $array = null;
- foreach ($row->result_object as $row) {
- if($row->parent == ""){
- $array[$row->id] = $row;
- }else{
- $array[$row->parent][] = $row;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement