Skip to content

Instantly share code, notes, and snippets.

@sansumbrella
Created May 14, 2009 22:41
Show Gist options
  • Save sansumbrella/111974 to your computer and use it in GitHub Desktop.
Save sansumbrella/111974 to your computer and use it in GitHub Desktop.
php to return JSON objects. Works with jQuery.
<?php
$JSON = '{events:[{title:"title", info:"info"},{title:"title", info:"info"},{title:"title", info:"info"}]}';
header("Content-type: application/json");
echo $_GET['callback']."($JSON);"
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment