问题是继:
$ PAGETITLE不能在功能之外使用。
这是我走到这一步:
function getMetaData($table, $rows){
echo $table;
echo $rows;
$selectTitle = "select * from $table";
$getTitle = mysql_query($selectTitle);
while ($showTitle = mysql_fetch_assoc($getTitle)){
$pageTitle = $showTitle[$rows];
}
}
getMetaData('metadata', 'Pagetitle');
我的输出
<?php echo $pageTitle ?>
- >这是不确定的
谢谢
虽然回声他们正在正确显示.. ?? – Gautam3164
是的,这只是为了测试 – xhallix
这是否工作:'$ pageTitle = $ showTitle ['Pagetitle'];'在while循环内? – vee