Login | Register | FAQ
Anonymous

Lesson 5 code mistake..

+ Post a reply

2 posts Page 1 of 1


Lesson 5 code mistake..

by KPSWebsites » Thu Jun 23, 2011 7:39 pm

The example at the bottom of the page in Lesson 5 has a few errors

This is the correct version:


for ($intRed=0; $intRed<=255; $intRed=$intRed+30) {

for ($intGreen=0; $intGreen<=255; $intGreen=$intGreen+30) {

for ($intBlue=0; $intBlue<=255; $intBlue=$intBlue+30) {

$strColor = "rgb(" . $intRed . "," . $intGreen . "," . $intBlue . ")";

echo "<span style='color:" . $strColor . "'> " . $strColor . " </span>";

}
}
}
User avatar

KPSWebsites

  • Posts: 7
  • Joined: Fri Feb 04, 2011 8:18 pm

Re: Lesson 5 code mistake..

by HTML.net » Thu Jun 23, 2011 9:52 pm

Thanks! It has been corrected.

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1194
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.


+ Post a reply

Page 1 of 1