SHARE
TWEET

Untitled

a guest Dec 19th, 2013 37 Never
  1. $menu = array(
  2.         0 => array(
  3.                 array('id' => 1, 'parent_id' => 0, 'title' => 'First level #1'),
  4.                 array('id' => 2, 'parent_id' => 0, 'title' => 'First level #2'),
  5.                 array('id' => 3, 'parent_id' => 0, 'title' => 'First level #3'),
  6.         ),
  7.         1 => array(
  8.                 array('id' => 8, 'parent_id' => 2, 'title' => 'Second level #8'),
  9.         ),
  10.         2 => array(
  11.                 array('id' => 4, 'parent_id' => 2, 'title' => 'Second level #4'),
  12.                 array('id' => 5, 'parent_id' => 2, 'title' => 'Second level #5'),
  13.         ),
  14.         4 => array(
  15.                 array('id' => 6, 'parent_id' => 4, 'title' => 'Third level #6'),
  16.                 array('id' => 7, 'parent_id' => 4, 'title' => 'Third level #7'),
  17.         ),
  18. );
RAW Paste Data
Top