PHP Text Help Needed

Hi guys and gals,

I need to change some php code to have color.

function streamate() {
    $bonus = round(($this->level * 1.5 * 55)-1);
    $this->SendMsg ('streamate: '. $bonus . 'gold');

I would like the last line ( 'streamate: '. $bonus . ‘gold’) to be
parsed in a color text.
Any help apreciated and sorry for being such a php noob

Can you clarify what do you mean by “parsed in a color text”? Do you want to display words in set colors? Something like this:
[php]$this->SendMsg ('streamate: '. $bonus . ‘gold’);[/php]

Yeah, i want the outputed log text to be color.
Unfortunately the code provided didnt work.
Thanks for the help.

Unfortunately the code provided didnt work.

This will work if you output HTML to a web browser. If you are sending email as plain/text this will display as html code, not coloring anything. For coloring text in email, you will need to specify in headers Content-type: text/html and also use other tags such as … .

To clarrify further it outputs :

streamate: 1023gold

Thanks again for the assistance, and sorry for being a noob.

it outputs where? In your browser?

yeah, in the browser into a live log

Well, looks like you need to check your SendMsg() function, and eliminate character encoding. You will likely find there htmlspecialchars() that converts special characters to HTML entities.

ok ty sorry got visitors atm, will check back in soon.
Cheers for this help :wink: much appreciated !

Sponsor our Newsletter | Privacy Policy | Terms of Service