array ('id' => 1, 'name' => 'Dir 1', 'parentID' => 0), 1 => array ('id' => 2, 'name' => 'Dir 2', 'parentID' => 0), 2 => array ('id' => 3, 'name' => 'Dir 1.1', 'parentID' => 1), 3 => array ('id' => 4, 'name' => 'Dir 1.1.1', 'parentID' => 3), 4 => array ('id' => 5, 'name' => 'Dir 1.1.1.1', 'parentID' => 4), 5 => array ('id' => 6, 'name' => 'Dir 1.1.2', 'parentID' => 3), 6 => array ('id' => 7, 'name' => 'Dir 3', 'parentID' => 0), 7 => array ('id' => 8, 'name' => 'Dir 3.1', 'parentID' => 7) ); $aryFile = array( 0 => array('id' => 1, 'name' => 'File 1', 'minetype' => 'text', 'size' => '1.5MB', 'parentID' => 1), 1 => array('id' => 2, 'name' => 'File 2', 'minetype' => 'text', 'size' => '1.6MB', 'parentID' => 1), 2 => array('id' => 3, 'name' => 'File 3', 'minetype' => 'text', 'size' => '1.7MB', 'parentID' => 2), 3 => array('id' => 4, 'name' => 'File 4', 'minetype' => 'text', 'size' => '1.8MB', 'parentID' => 2), 4 => array('id' => 5, 'name' => 'File 5', 'minetype' => 'text', 'size' => '1.8MB', 'parentID' => 0), 5 => array('id' => 6, 'name' => 'File 6', 'minetype' => 'text', 'size' => '1.8MB', 'parentID' => 3), 5 => array('id' => 7, 'name' => 'File 7', 'minetype' => 'text', 'size' => '1.8MB', 'parentID' => 5) ); $aryData = array('DIRECTORIES' => $aryDir, 'FILES' => $aryFile); echo json_encode($aryData); } public function createDir () { } public function deleteDir () { } } /* End of file directory.php */ /* Location: ./application/modules/ajax/controllers/directory.php */