Adds jQuery collection to objects that will be used as global events context if provi...
[jquery.git] / test / data / json.php
index 08e3f9e..d6e0f2f 100644 (file)
@@ -1,9 +1,13 @@
-<?php\r
-error_reporting(0);\r
-$json = $_REQUEST['json'];\r
-if($json) {\r
-       echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ]';\r
-} else {\r
-       echo '{ "data": {"lang": "en", "length": 25} }';\r
-}\r
-?>
\ No newline at end of file
+<?php
+error_reporting(0);
+if ( $_REQUEST['header'] ) {
+       header("Content-type: application/json");
+}
+
+$json = $_REQUEST['json'];
+if($json) {
+       echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ]';
+} else {
+       echo '{ "data": {"lang": "en", "length": 25} }';
+}
+?>