Page 1 of 1

creates colored font.

Posted: Wed Apr 30, 2008 5:24 am
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. :)

Re: creates colored font.

Posted: Wed Apr 30, 2008 5:56 am
by aceconcepts
So you're trying to ouput $event_info[$value]['0'] in green?

Re: creates colored font.

Posted: Wed Apr 30, 2008 7:46 am
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";