note 87187 modified in function.echo by thiago

From: Date: Mon, 24 Nov 2008 11:36:04 +0000
Subject: note 87187 modified in function.echo by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146862@lists.php.net to get a copy of this message
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. --was-- 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: <? 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. http://php.net/manual/en/function.echo.php

« previous php.notes (#146862) next »