Created
March 16, 2019 00:12
-
-
Save asha23/3016cbf1989db6fe3cdef527fb186076 to your computer and use it in GitHub Desktop.
Congratulations. You've done your due dilligence and realised that I can write code.. Don't make me do this as a code test. I'll just post this link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function fizzBuzz() { | |
| foreach (range(25,250) as $i): | |
| $out = ""; | |
| if ($i % 7 == 0): | |
| $out .= "Fizz "; | |
| endif; | |
| if ($i % 5 == 0): | |
| $out .= "Buzz "; | |
| endif; | |
| if(!$out): | |
| $out .= "$i" ; | |
| endif; | |
| echo "$out\n"; | |
| endforeach; | |
| }; | |
| fizzBuzz(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment