<?php
/*The task is to print out numbers 1 through 100 but for multiples of 3 print out “Fizz” instead of the number and for multiples of 5 print “Buzz” instead. If the number happens to be divisble by both 3 and 5 print out “FizzBuzz” instead of the number.*/
for ($i = 1; $i <= 100; $i++)
{
$var = ($i % 3 === 0) ? "Buzz" : (($i % 5 === 0) ? "Fizz" : $i);
if ($i % 3 === 0 && $i % 5 === 0)
{
$var = "FizzBuzz";
}
echo $var, PHP_EOL;
}