0

我目前正在阅读 drupal 模块中的一些代码,并在关联数组中遇到以下内容。

$this->replacements = array(
      '%field' => $this->instance['label'],
      '%bundle' => $bundles[$this->instance['entity_type']][$this->instance['bundle']]['label'],
);

键中的 % 是什么意思还是只是一个字符串标签

4

1 回答 1

-1

我认为它只是刺痛的标签。

$a = array("%name" => "pugazh", "vaalue" => "value");
print_r($a);

如果您在 corephp 中尝试这样,它将返回这样的输出

Array ( [%name] => pugazh [vaalue] => value )  

但我不知道它在drupal中是什么意思。

于 2013-05-31T08:58:12.867 回答