从 Web 服务执行此代码时,标题和关键字按预期显示在元标记中。描述仍然是空的。如何将 $array 中的动态数组内容放入描述中?Ps 例如 $array[3] 也不起作用。
$array = $result->AAAResult->AAA->A;
$teller = count($array);
$titeltekst = "{$teller} quantity: $r";
$doc =& JFactory::getDocument();
$options = $doc->getHeadData();
$options['title'] = $titeltekst;
$options['metaTags']['standard']['keywords'] = "keywords - test";
$options['metaTags']['standard']['description'] = $array;
$doc->setHeadData($options);