Created
May 5, 2020 07:03
-
-
Save phpfiddle/4701e1b2427c93c29c98ee2f26d1dba9 to your computer and use it in GitHub Desktop.
[ Posted by Lanang ] thread_solution
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($num=1; $num <= 100; $num++) { | |
if($num % 3 == 0 && $num % 5 == 0) { | |
echo "yeah nah <br>"; | |
}elseif($num % 3 == 0) { | |
echo "yeah <br>"; | |
} elseif($num % 5 == 0) { | |
echo "nah <br>"; | |
}else { | |
echo "$num <br>"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment