Drupal 7 分析错误:语法错误,template.php中出现意外的T_双_箭头

Drupal 7 分析错误:语法错误,template.php中出现意外的T_双_箭头,drupal-7,Drupal 7,在Drupal7中,主题获取解析错误:语法错误,第254行的/sites/all/themes/arizona_horizontal/template.php中出现意外的T_双_箭头 function template_node_submitted(&$variables){ return t('By !username on @datetime', array('!username' => theme('username', $variables['node'], '@d

在Drupal7中,主题获取解析错误:语法错误,第254行的/sites/all/themes/arizona_horizontal/template.php中出现意外的T_双_箭头

    function template_node_submitted(&$variables){
return t('By !username on @datetime',
array('!username' => theme('username', $variables['node'], '@datetime' => format_date($variable['node']->created),));
}

你能告诉我我到底哪里出错了吗。

第二个双箭头(
'@datetime'=>
)必须在
数组()中。
。我不知道你想做什么,但我猜你想写:

function template_node_submitted(&$variables){
  return t('By !username on @datetime', array(
      '!username' => theme('username', $variables['node']),
      '@datetime' => format_date($variable['node']->created),
  ));
}

你可能应该考虑用更好的缩进来格式化你的代码,这样你就可以很快地看到这种语法错误。