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
Favorite color should it be stored why?or why not?<br>​
Triss [41]

Answer:

Explanation:

green

8 0
3 years ago
Which part of the operating system enables you to interact with the device? Question 9 options: The graphical user interface The
Zigmanuir [339]

Answer: The graphical user interface

Explanation:

The graphical user interface (GUI) is a form of user interface that allows user of a device interacts with it through graphical icons or cursors, text based commands or audio commands. The functionality of a GUI is a consequence of the direct manipulation of its graphical elements. Specialized GUIs that allows for speech based commands are called natural user interfaces.

4 0
3 years ago
All parking revenue comes from a home teams games? True or false
Greeley [361]

Answer:

False

Explanation:

False, all parking revenues do not come from home team games. The home team refers to a team that plays on its ground. Parking Revenue refers to the revenue earned from the rental of parking space.

Stadium owners can generate more revenue from parking and concessions by increasing the use of their venue. Stadium parking is also one of the sources of income.

3 0
3 years ago
Please describe the role of games in modern society!
ohaa [14]
It is to Entertainment.
5 0
3 years ago
Read 2 more answers
Which of the following is NOT an example of written communication?
Veronika [31]

Answer:A conversation between co-workers

Explanation:

4 0
3 years ago
Other questions:
  • You should use _____ software for writing a letter.
    10·1 answer
  • Alpha Technologies, a newly established company, wants to share information about its work with people all over the world. Which
    9·1 answer
  • Which of the following provides astronomical evidence for the age of the earth?
    11·1 answer
  • Wired network are the most reliable and provide the highest speed?
    7·1 answer
  • A company has critical systems that are hosted on an end-of-life OS. To maintain operations and mitigate potential vulnerabiliti
    14·1 answer
  • How would you describe<br> "analogous color harmony" to a six year old?
    13·1 answer
  • Match the following pls help
    5·1 answer
  • What does Amara hope will<br> happen when Dad sits on the sofa?
    8·1 answer
  • Find out about the different technological solutions available for interconnecting LANs to from larger networks such as wide are
    5·1 answer
  • The ________ approach to motivation suggests a connection between internal physical states and outward behavior. achievement dri
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!