NYCPHP Meetup

NYPHP.org

[nycphp-talk] Printing Colorful Arrays In The Terminal...

Darryle Steplight dsteplight at gmail.com
Thu May 31 12:15:35 EDT 2012


Thanks Chris ,

That's exactly what I was looking for. For anyone else who needs help
with this, here are my working examples, with a little explanation.

echo -e "\033[34m Contact List \033[0m";    <-  The "34m" part makes
Contact List a dark  blue color and  the  "0m" at the end  stops the
coloring. If I don't change it to 0, my prompt will also be  dark
blue.

If I use 31m instead of 34m, then Contact List will be red, instead of
dark blue,

echo -e "\033[31m Contact List \033[0m". I hope that helps someone.


On Thu, May 31, 2012 at 11:59 AM, Chris Snyder <chsnyder at gmail.com> wrote:
> On Thu, May 31, 2012 at 11:48 AM, Matthew Kaufman <mkfmncom at gmail.com> wrote:
>> http://pear.php.net/Console_Color
>>
>
> If you just need a quick hack and you're using bash, this will help:
> http://tldp.org/LDP/abs/html/colorizing.html
>
> Note that where it says \E in the examples you should replace with
> \033 to get an ESC character.
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show-participation



-- 
----------------------------------------------
"May the Source be with you."



More information about the talk mailing list