git.ithinksw.org
/
extjs.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git]
/
examples
/
data
/
order.php
1
<?php
2
$orders = array(array(
3
'id'=>1,
4
'date'=>'2010-08-13',
5
'customer_id'=>1
6
), array(
7
'id'=>2,
8
'date'=>'2010-07-14',
9
'customer_id'=>1
10
), array(
11
'id'=>3,
12
'date'=>'2010-01-22',
13
'customer_id'=>2
14
), array(
15
'id'=>4,
16
'date'=>'2010-11-06',
17
'customer_id'=>2
18
), array(
19
'id'=>5,
20
'date'=>'2010-12-29',
21
'customer_id'=>3
22
), array(
23
'id'=>6,
24
'date'=>'2010-03-03',
25
'customer_id'=>3
26
)
27
);
28
29
if (isset($_REQUEST['id'])) {
30
$id = $_REQUEST['id'];
31
foreach ($orders as &$order) {
32
if ($order['id'] == $id) {
33
echo json_encode($order);
34
break;
35
}
36
}
37
} else {
38
echo json_encode($orders);
39
}
40
?>