Skip to content

Instantly share code, notes, and snippets.

@openmindculture
Created March 19, 2021 08:55
Show Gist options
  • Save openmindculture/1723a31ecc05a13e53d6397b098d3e1e to your computer and use it in GitHub Desktop.
Save openmindculture/1723a31ecc05a13e53d6397b098d3e1e to your computer and use it in GitHub Desktop.
<?php
for ($i = 1; $i <= 100; $i++) {
$isMultipleOfThree = ($i % 3 == 0);
$isMultipleOfFive = ($i % 5 == 0);
if ($isMultipleOfThree) {
echo "Support";
}
if ($isMultipleOfFive) {
echo "Desk";
}
if (!$isMultipleOfThree && !$isMultipleOfFive) {
echo $i;
}
echo "
";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment