Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5841383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:53:00+00:00 2026-05-22T11:53:00+00:00

<?php //Set up the base vars $sceneCount=23; $currentScene=1; $brainBlownCounter=0; //Assemble the scenes while($currentScene <=

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

Can anyone spot any problems in this code?

The while loop isnt acting as it should be and nothing gets outputted!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:53:01+00:00Added an answer on May 22, 2026 at 11:53 am

    Increment the value of currentScene

    while($currentScene <= $sceneCount)
    {
        $scenes[] = 'Scene '.$currentScene;
        $currentScene++;
    }
    

    and

    Change this

    foreach ($scene as $somethingThatHappened)
    

    To

    foreach ($scenes as $somethingThatHappened)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have my PHP class variables set up like this: class someThing {
I can set the PHP include path in the php.ini : include_path = /path/to/site/includes/
How can I best set up my PHP (LAMP) development environment so that I
How can I set the cookies in my PHP apps as HttpOnly cookies ?
I am writing a set of database-driven applications in PHP. These applications will run
I have a PHP-generated page which is displaying some data about a set of
I'm running PHP 5.2.6 on a Windows Server 2003 Enterprise box. IIS is set
I have OS X 10.5 set up with the precompiled versions of PHP 5
How do you build a hierarchical set of tags with data in PHP? For
Looking for a good set of base objects to start a website up in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.