Question: In PHP: Write code that If the number is divisible by 3, then print Fizz. If the number is divisible by 5 then print Buzz.

In PHP:

Write code that If the number is divisible by 3, then print "Fizz." If the number is divisible by 5 then print "Buzz." If it is divisible by both, then print "FizzBuzz." Otherwise, just print the number.

If the user does not submit a start and stop number for the range (inclusive), then assume that start is 1 and stop is 100. Otherwise, use the specified range.

#Use Starter Code:

Here's some output from the form.

echo "

The number is {$number}. So here are ${number} lines of output:

    "; for ($i = 0; $i This line $i "; } echo "

"; ?>

Result:

In PHP: Write code that If the number is divisible by 3,

FizzBuzz between 27 and 45 - Fizz :28 - FizzBuza - 31 - 32 - Fizz 34 - Buzz - 37 - 38 - Fizz - Buzz - 41 - Fizz : 43 - 44 - Fizz\&uzz

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!