# Text/Background color in Bash/PHP

The article this was taken from was for bash, and I was able to put the code into a PHP script and it worked when run in bash.

echo -e "\\e\[42m\\e\[30mVisa Required\\e\[0m\\n"; # green bkgrd, black text  
echo -e "\\e\[43m\\e\[30mVisa Required\\e\[0m\\n"; # yellow bkgrd, black text  
echo -e "\\e\[44m\\e\[37mVisa Required\\e\[0m\\n"; # blue bkgrd, white text  
echo -e "\\e\[41m\\e\[37mVisa Required\\e\[0m\\n"; # red bkgrd, white text

  
echo "30 &amp; 40 indicate black\\n";  
echo "31 &amp; 41 indicate red\\n";  
echo "32 &amp; 42 indicate green\\n";  
echo "33 &amp; 43 indicate yellow\\n";  
echo "34 &amp; 44 indicate blue\\n";  
echo "35 &amp; 45 indicate magenta\\n";  
echo "36 &amp; 46 indicate ltBlue\\n";  
echo "37 &amp; 47 indicate white\\n";