<?php
//Set up the base vars
$sceneCount=23;
$currentScene=1;
$brainBlownCounter=0;
//Assemble the scenes
while($currentScene <= $sceneCount)
{
$scenes[] = 'Scene '.$currentScene;
}
//Make this film special
array_reverse($scenes);
//Play
$sceneCounter =0;
foreach ($scene as $somethingThatHappened)
{
$sceneCounter++;
$leonardsMemory = $somethingThatHappened;
echo ('We see '.$somethingThatHappened.'<br />');
echo ('Your brain is now '.(($sceneCounter/count($scenes) * 100)).'% blown.<br /><br />';
$leonardsMemory=NULL;
}
//TODO: Remember Stanley Ipkiss
?>
任何人都可以发现此代码中的任何问题?PHP虽然循环是无限的
while循环不是按照它应该的那样工作,也不会输出!
感谢
-1的值???为什么投票下来? – benhowdle89 2011-05-17 17:17:23