Created
September 25, 2015 04:57
-
-
Save edutrul/79144507ec9a733a201e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mymodule_menu() { | |
$items['fancystuff/json/%'] = array( | |
'access callback' => true, // available to all | |
'page callback' => 'mymodule_fancystuff_object', // defined below | |
'page arguments' => array(2), | |
'delivery callback' => 'drupal_json_output' | |
); | |
return $items; | |
} | |
function mymodule_fancystuff_object($userid) { | |
return array('test'=>true,'dummy'=>array(0, 1, $userid)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment