note 90081 added to function.mt-rand

From: Date: Sun, 05 Apr 2009 15:12:32 +0000
Subject: note 90081 added to function.mt-rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-152833@lists.php.net to get a copy of this message
@keith: Here is a WAY better Methode to create a random Color. (Not tested) <?php $randColor = dechex(mt_rand(0, 0xFFFFFF)); $randColor = "#" . strtoupper(str_pad($randColor, 6, "0", STR_PAD_LEFT)); ?> <table width="200px" border="0" cellspacing="10" cellpadding="0" bgcolor="<?= $randColor; ?>"> <tr> <td>This Table has a random Background-Color</td> </tr> </table> $randColor equals to something like #00A78F ---- Server IP: 69.147.83.197 Probable Submitter: 84.166.7.179 ---- Manual Page -- http://www.php.net/manual/en/function.mt-rand.php Edit -- https://master.php.net/note/edit/90081 Del: integrated -- https://master.php.net/note/delete/90081/integrated Del: useless -- https://master.php.net/note/delete/90081/useless Del: bad code -- https://master.php.net/note/delete/90081/bad+code Del: spam -- https://master.php.net/note/delete/90081/spam Del: non-english -- https://master.php.net/note/delete/90081/non-english Del: in docs -- https://master.php.net/note/delete/90081/in+docs Del: other reasons-- https://master.php.net/note/delete/90081 Reject -- https://master.php.net/note/reject/90081 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152833) next »