Last active
July 22, 2020 17:58
-
-
Save jcmexdev/b119c5bf23ccb7351c76eafe609b5b48 to your computer and use it in GitHub Desktop.
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 | |
| for ($i = 1; $i <= 100; $i++) { | |
| $output = null; | |
| if (!($i % 3)) { | |
| $output .= "Fizz"; | |
| } | |
| if (!($i % 5)) { | |
| $output .= "Buzz"; | |
| } | |
| if ($output == null) { | |
| echo "$i<br>"; | |
| continue; | |
| } | |
| echo "$output<br>"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment