Skip to content

Instantly share code, notes, and snippets.

@abouolia
Last active August 25, 2017 01:18
Show Gist options
  • Save abouolia/d0c9f7d39051be97e4fe4c992360e55c to your computer and use it in GitHub Desktop.
Save abouolia/d0c9f7d39051be97e4fe4c992360e55c to your computer and use it in GitHub Desktop.
Ahmed Bouhuolia
<?php
$count = 100;
for($i = 1; $i <= $count; $i++){
if( $i % 5 === 0 && $i % 3 === 0 ){
echo 'Fizz-Buzz ';
} else if( $i % 3 === 0 ){
echo 'Fizz ';
} else if( $i % 5 === 0 ){
echo 'Buzz ';
}
echo $i . ' ';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment