【发布时间】:2009-10-12 16:24:27
【问题描述】:
以下代码有问题。它应该做的是回显cats.php,后跟example.php,但它不回显example.php。任何想法为什么会发生这种情况?
$bookLocations = array(
'example.php',
'cats.php',
'dogs.php',
'fires.php',
'monkeys.php',
'birds.php',
);
echo $bookLocations[1];
function findfile($filenumber)
{
echo $bookLocations["$filenumber"];
}
findfile(0);
【问题讨论】:
-
我不明白为什么有人会否决这个问题。
标签: php user-defined-functions