+</code></pre>\r
+ * <p>Below is a PHP example to do the same thing:</p><pre><code>\r
+$callback = $_REQUEST['callback'];\r
+\r
+// Create the output object.\r
+$output = array('a' => 'Apple', 'b' => 'Banana');\r
+\r
+//start output\r
+if ($callback) {\r
+ header('Content-Type: text/javascript');\r
+ echo $callback . '(' . json_encode($output) . ');';\r
+} else {\r
+ header('Content-Type: application/x-json');\r
+ echo json_encode($output);\r
+}\r