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

  • SEARCH
  • Home
  • 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 9169853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:56:09+00:00 2026-06-17T15:56:09+00:00

I’m having a problem figuring out an exercise my boss gave me as personal

  • 0

I’m having a problem figuring out an exercise my boss gave me as personal enrichment of knowledge sort of. Unfortunately I have been looking for a glimpse of answer everywhere on the web with no success and I’m now turning to you fellow programmers.

What he asked me to do is make a simple countdown from 100 to 0 (it can be displayed all at once). Easy enough so far eh? Just make a simple for loop or a while even. The problem here is that he asks that there are no assignations in the code, ex: $[var]=[value].

How can one even make a loop with no assignations? Since $i--; is the equivalent to $i = $i - 1; how can we count down?

I’m baffled by this problem which I can’t resolve, I really want to find the answer as I am very curious on how this can be done.

Help is kindly appreciated.

Edit

Take note that this problem is kind of a 2 part where as the first part is to make it work 100 to 0, and in the second part x to 0 where x is inputted by the user

  • 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-06-17T15:56:10+00:00Added an answer on June 17, 2026 at 3:56 pm

    My guess would be that your boss is trying to encourage you towards recursion rather than iteration. Recursion, as a technique, works extremely well for certain problems, and is an excellent tool to have in your armoury as a programmer.

    Without giving everything away, try experimenting with defining a function that takes an argument – the “countdown” number — and then calls itself in some way. You’ll also need to separately kick it off by calling it once you’ve defined it.

    Bear in mind that recursion must have some kind of termination defined, otherwise things can go very wrong. Here’s an example of something going very wrong to get you started: 😀

    <?php
      function infinity() {
        print "Whoah.";
        infinity();
      }
      infinity();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been unable to fix a problem with Java Unicode and encoding. The
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.