The 5th Annual China PHP Conference

Voting

Please answer this simple SPAM challenge: nine plus zero?
(Example: nine)

The Note You're Voting On

djcassis at gmail
10 years ago
To display colored text when it is actually supported :
<?php
echo "\033[31m".$myvar; // red foreground
echo "\033[41m".$myvar; // red background
?>

To reset these settings :
<?php
echo "\033[0m";
?>

More fun :
<?php
echo "\033[5;30m;\033[48mWARNING !"; // black blinking text over red background
?>

More info here : http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html

<< Back to user notes page

To Top