note 55537 added to control-structures.for

From: Date: Sat, 06 Aug 2005 11:58:25 +0000
Subject: note 55537 added to control-structures.for
Groups: php.notes 
Request: Send a blank email to php-notes+get-93162@lists.php.net to get a copy of this message
Here is a quick function I wrote for creating a web-true colour palette. function webTrueColors() { // create array for hexadecimal colors $colors = array("00", "33", "66", "99", "CC", "FF"); // build table $c= "<table cellspacing=0 cellpaddding=0 border=1>"; // loop through all combinations for ($i=0; $i<6; $i++) { for ($j=0; $j<6; $j++) { $c.= "<tr>"; for ($k=0; $k<6; $k++) { $thisColor = $colors[$i].$colors[$j].$colors[$k]; // display color and hex value $c.= "<td bgcolor=\"#".$thisColor."\">".$thisColor."</td>"; } $c.= "</tr>"; } } // close table $c.= "</table>"; // output to screen echo $c; } ---- Manual Page -- http://www.php.net/manual/en/control-structures.for.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55537 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55537&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55537&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55537&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55537&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55537&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55537&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55537&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93162) next »