【发布时间】:2016-03-17 19:52:25
【问题描述】:
我在 drupal 7 中创建了一个自定义模块。使用 hook_menu() 我正在获取一个 ajax 值。我创建了一个回调函数来获取这个值。但是我需要在另一个函数中使用这个值。
$items['schoolfilterval/%'] = array(
'page callback' => 'sfilterval',
'page arguments'=> array(1),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
function sfilterval($fvals){
return $city_name;
}
我需要在此处的自动完成功能中使用 $city_name:
function finderschool_autocomplete($string) {
//here I need to use this $city_name value.
}
【问题讨论】: