Question: some PHP looping questions: Hello! I just started learning PHP and AM currently working on using a for loop to display four trees in a

some PHP looping questions:

Hello! I just started learning PHP and AM currently working on using a for loop to display four trees in a row, as shown below:

some PHP looping questions: Hello! I just started learning PHP and AM

My current problem is that I have this loop in the same

, and I should have four

instead of one, but I don't know if I would use a loop to do that

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

My current display:

currently working on using a for loop to display four trees in

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

some code that I wrote:

Lab 1 "; } } //table 1 echo "

"; echo "";

echo "

"; echo "
"; echo "
"; drawTrapezoid(1, 5, "*"); drawTrapezoid(3, 7, "*"); drawTrapezoid(5, 10, "*"); $nStar = 5; for ($row = 0; $row "; } echo "
"; echo "
"; echo "
"; echo "
"; //table 2 echo ""; echo "";

echo "

"; echo "

"; echo "
"; echo "
"; for($x=0; $x"; } } echo "
"; echo "
"; echo "
";

?>

| | ole ole ole ole ole ole ole ole **** ***

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!