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
jay23
Forum Newbie
Posts: 12 Joined: Fri Apr 25, 2008 6:44 pm
Post
by jay23 » Wed Apr 30, 2008 5:24 am
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.
aceconcepts
DevNet Resident
Posts: 1424 Joined: Mon Feb 06, 2006 11:26 am
Location: London
Post
by aceconcepts » Wed Apr 30, 2008 5:56 am
So you're trying to ouput $event_info[$value]['0'] in green?
markusn00b
Forum Contributor
Posts: 298 Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England
Post
by markusn00b » Wed Apr 30, 2008 7:46 am
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";