Last active
January 5, 2018 16:02
-
-
Save ReinierC/73e1d1d0f08b39f08da417e984d279a2 to your computer and use it in GitHub Desktop.
Woof-Meow / Copper-Lunch-Brake
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Copper Lunch Break</title> | |
<style> | |
p { | |
font-size: 12px; | |
} | |
.alert { | |
color: red; | |
} | |
</style> | |
</head> | |
<body> | |
<h2>BussFizz WoofMeow CopperLunchBreak</h2> | |
<?php | |
function copperLunchbreak(){ | |
for ($i = 1; $i <= 100; $i++){ | |
if($i % 3 == 0 && $i % 5 ==0){ | |
echo "<a class='alert'>$i Attention all officers</a></br>"; | |
} | |
else if($i % 3 == 0){ | |
echo $i." Pizza for lunch<br />"; | |
} | |
else if($i % 5 == 0){ | |
echo $i." Donuts for lunch<br />"; | |
} | |
else { | |
echo $i." Sleeping on the job<br />"; | |
} | |
} | |
} | |
?> | |
<div> | |
<p><?php copperLunchbreak() ?><p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment