creates colored font.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jay23
Forum Newbie
Posts: 12
Joined: Fri Apr 25, 2008 6:44 pm

creates colored font.

Post by jay23 »

Code: Select all

$event_info[$value]['1'] . " "<font color='green'> . $event_info[$value]['0']  ."</font>". "</a>\n<br>\n";

hw woud be the way to present this code i want to creates colored font.


i get this error message : Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'

help please. :)
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: creates colored font.

Post by aceconcepts »

So you're trying to ouput $event_info[$value]['0'] in green?
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: creates colored font.

Post by markusn00b »

The way you're concatenating strings is giving you the error.
Keep it easy to read:

Code: Select all

 
$event_info[$value]['1'] . " "<font color='green'> . $event_info[$value]['0']  ."</font>". "</a>\n<br>\n";
 // becomes
"{$vent_info[$value][1]} <font color='green'>{$event_info[$value][0]}</font></a>\n<br />\n";
 
Post Reply