note 23119 added to function.dechex

From: Date: Tue, 09 Jul 2002 22:27:32 +0000
Subject: note 23119 added to function.dechex
Groups: php.notes 
Request: Send a blank email to php-notes+get-32822@lists.php.net to get a copy of this message
<?php /*Takes decimal red, green and blue and returns the html hexadecimal equivelant */ function html_color($red, $green, $blue){ $html_color = "#".dechex($red).dechex($green).dechex($blue); return $html_color; } /*Example of usage */ $red = 40; $green = 140; $blue = 200; $html_color = html_color($red, $green, $blue); print("<body bgcolor='$html_color'></body>"); ?> -- http://www.php.net/manual/en/function.dechex.php http://master.php.net/manage/user-notes.php?action=edit+23119 http://master.php.net/manage/user-notes.php?action=delete+23119 http://master.php.net/manage/user-notes.php?action=reject+23119

« previous php.notes (#32822) next »