X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/data/customer.php?ds=sidebyside diff --git a/examples/data/customer.php b/examples/data/customer.php new file mode 100644 index 00000000..c5dede29 --- /dev/null +++ b/examples/data/customer.php @@ -0,0 +1,28 @@ +1, + 'name'=>'Bread Barn', + 'phone'=>'8436-365-256' + ), array( + 'id'=>2, + 'name'=>'Icecream Island', + 'phone'=>'8452-389-719' + ), array( + 'id'=>3, + 'name'=>'Pizza Palace', + 'phone'=>'9378-255-743' + ) +); + +if (isset($_REQUEST['id'])) { + $id = $_REQUEST['id']; + foreach ($customers as &$customer) { + if ($customer['id'] == $id) { + echo json_encode($customer); + break; + } + } +} else { + echo json_encode($customers); +} +?> \ No newline at end of file