1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elden [556K]
3 years ago
9

PHP Create a for loop that initialize with the variable $i = 10 The loop outputs $i as long as $i is greater than 1 using for lo

op Use echo statement to output $i Make sure to use operator based on the desired condition mentioned (increment $i++ / decrement $i–) Make sure each line of code ends with a semi colon i.e ;
Computers and Technology
1 answer:
Tanzania [10]3 years ago
4 0

Answer:

The PHP code is as follows

<?php

for ($i = 10; $i>1; $i--)

{

echo $i.' ';

}

?>

Explanation:

The code is self explanatory and doesn't require comments before it can easily understood.

The program starts with a php opening tag <?php

And it ends with the closing tag ?>

The interpretation of the question is to print integer values from 10 to 1

To do this, an iteration is needed.

The above program makes use of a for loop iteration.

Analysis;

for ( -> This shows that it is a for loop iteration

$i = 10; -> Iterating variable $i is initialized to 10 (that is; printing will start at 10)

$i>1; -> Iteration is valid while $i is greater than 1 (e.g. 2,3,4...10)

$i-- -> For every Iteration, decrease $i by 1

) -> End of Iterating condition

echo $i.' '; -> This line prints the valid values of $i. In this case, the values of $i is from 10 and stops at 2

The output is as follows

10 9 8 7 6 5 4 3 2

You might be interested in
Do the pros of interpersonal communication via social media outweigh the cons? Explain.
JulijaS [17]
Well in my opinion is that yes they do. The ability to be able to communicate with others so far way really helps society advance towards the future. And i cant stress of how the benefits of being able to share ideas with well anyone is so wonderful.

I hope this helps.
6 0
3 years ago
Read 2 more answers
1.A panel that , when active , displays options for the selected tool. *
yKpoI14uk [10]
Is there a question or something
7 0
3 years ago
Read 2 more answers
When would it be necessary to edit the information shown on an electronic business card?
Goryan [66]

Answer:

Really depends on your situation. If you specified, I'd have an asnwer

3 0
3 years ago
Read 2 more answers
The National Institute of Standards and Technology (NIST) guidelines list four different states a mobile device can be in when y
Ahat [919]

Answer:

quiescent

Explanation:

The National Institute of Standards and Technology (NIST) guidelines list four different states a mobile device can be in when you extract data. The quiescent mode is a dormant mode that conserves battery life while maintaining user data and performing other background functions.

4 0
3 years ago
John is an entrepreneur who plans to enter a franchise contract with a hotel business. Which of these is an advantage that John
ladessa [460]

The answer is C:

In most Franchise businesses, the franchisor provides ongoing guidance and support, and a developed way of doing business. In addition, they offer a higher rate of success as compared to start-up businesses and you may find it easier to secure finances for a franchise. You will get all the benefits that are attached with big businesses for a small business ownership.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Is bit stuffing necessary in the control or address field in theHDLC protocol? why?
    13·1 answer
  • What are the cause of eye strain during computer usage?
    7·1 answer
  • What special member function of a class is called whenever an instance of a class is created and initialized?
    15·1 answer
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • _________ is the start up sequence a computer conducts.
    9·1 answer
  • How to cancel branly subscription??​
    8·1 answer
  • After Alexandra installed new software, she set it up to perform in a certain way. She is _____. changing the peripherals linkin
    10·1 answer
  • Fill in the table below of the Interactive Word Wall. You are provided with the
    13·1 answer
  • EMERGENCY- I am giving 55 points for this, please help. WITH working out
    7·1 answer
  • How to create drop down list in excel with multiple selections.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!