On 02-Apr-2004 Leonard B Burton wrote:
> Greetings,
>
> This is more of a graphic question
>
> For a program I am writting I need to have a control panel to display
> anything that may be wrong. I would like to use something like a
> stoplight so that it would be easily understood by a lay person.
> Does anyone have any comments as to what they have used? Also does
> anyone have a function/graphic that would be a stop light and
> changing the var would make it either show red, green, or yellow?
>
function stoplight($val) {
$light = array(
'ok' => 'images/green.jpg',
'iffy' => 'images/yellow.jpg',
'bad' => 'images/red.jpg'
);
echo '<img src="' .$light[$val] .'" height="xxx" width="xxx">';
}
...
stoplight( $foo < 10 ? 'ok' : $foo > 25 ? 'bad' : 'iffy' );
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php