<?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