I have this menu hook below, by which I send two parameters to a function.
But in the function, I get only the first parameter.
Does anyone know how to send and receive multiple parameters using the Drupal menu system?
function drupal_menu(){ $items = array(); $items['drupal/%/%'] = array( 'title' => t('Welcome to the Hello World Module'), 'page callback' => 'drupal_page', 'page arguments' => array(1,2), 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } function drupal_page($arg1, $arg2) { return drupal_json(array('mess1'=>$arg1,'mess2'=>$arg2)); }
Vikas Naranje
source share