note 87187 deleted from function.echo by googleguy
| From: | googleguy@php.net | Date: | Wed, 22 Jan 2014 20:53:42 +0000 |
| Subject: | note 87187 deleted from function.echo by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198310@lists.php.net to get a copy of this message | ||
Note Submitter: Jakob Thomsen
----
A way to color your echo output is to use shell_exec and the echo command (this only works on
Linux/bash) in the following way:
<?php
echo shell_exec('echo "\e[0;31m Red color \e[0;32mGreen color \e[0m No color
"');
?>
See http://wiki.archlinux.org/index.php/Color_Bash_Prompt
for more colors and other options.