source: violetspace-prototype/getdata.php @ 1

Last change on this file since 1 was 1, checked in by dungnv, 11 years ago
File size: 973 bytes
Line 
1<?php
2/**
3*array(
4*       0 => array ('id' => 1, 'name' => 'Dir 1', 'parentID' => 0),
5*       1 => array ('id' => 2, 'name' => 'Dir 2', 'parentID' => 0),
6*       2 => array ('id' => 3, 'name' => 'Dir 1.1', 'parentID' => 1),
7*       3 => array ('id' => 4, 'name' => 'Dir 1.1.1', 'parentID' => 3),
8*       4 => array ('id' => 5, 'name' => 'Dir 1.1.1.1', 'parentID' => 4),
9*)
10**/
11
12
13$aryDir = array(
14                        0 => array ('id' => 1, 'name' => 'Dir 1', 'parentID' => 0),
15                        1 => array ('id' => 2, 'name' => 'Dir 2', 'parentID' => 0),
16                        2 => array ('id' => 3, 'name' => 'Dir 1.1', 'parentID' => 1),
17                        3 => array ('id' => 4, 'name' => 'Dir 1.1.1', 'parentID' => 3),
18                        4 => array ('id' => 5, 'name' => 'Dir 1.1.1.1', 'parentID' => 4),
19                        5 => array ('id' => 6, 'name' => 'Dir 1.1.2', 'parentID' => 3),
20                        6 => array ('id' => 7, 'name' => 'Dir 3', 'parentID' => 0),
21                        7 => array ('id' => 8, 'name' => 'Dir 3.1', 'parentID' => 7)
22                );
23
24if (count($_POST) == 0) {
25        echo json_encode($aryDir);
26}
Note: See TracBrowser for help on using the repository browser.