Thank you. I have adjust the code a little, See Below. Kindly help me check. @camperextraordinaire, Pls be a good teacher. I know you can assist. I will appreciate.
<b> This in bold</b>
<u>This is underline</u>
<i>This is italic</i>
<?php
for ($i = 1; $i <= 1000000; ++$i) {
$mod3 = $i % 3;
$mod10 = $i % 10;
$str = '';
if (!$mod3) {
$str = '<p style="color: red;"><u>$i</u></p>';
}
if (!$mod10) {
$str .= '<p style="color: blue;"><u>$i</u></p>';
}
if ($mod3 && $mod10) {
$str .= '<p style="color: purple;"><em>$i</em></p>';
}
echo $str, "\n"; // gives: the color is red, blue, purple
}
?>