Created
June 29, 2015 00:38
-
-
Save veb/253fbe11a99328368297 to your computer and use it in GitHub Desktop.
fizzbuzzzzz
This file contains 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++) | |
{ | |
$cond['Fizz'] = 3; | |
$cond['Buzz'] = 5; | |
$x = $i; | |
foreach($cond as $k => $v) { | |
if ($i % $v == 0) { | |
echo $k; | |
$x = null; | |
} | |
} | |
echo "$x <br/>\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment