This topic is locked
[SOLVED]

 Conditional Formatting Syntax Error.....

5/17/2014 5:24:33 AM
PHPRunner General questions
D
DUKE author

I was using the following from the conditional formatting example:
if ($value = "Y") {

$value =$value. ' <img src="green.png" alt="" />';

$color="black";

} else {

$value ='<strong>'.$value. '</strong> <img src="red.png" alt="" />';

$color="red";

}

$value="<span style="color: &quot; . $color . &quot;;">$value</span>";
Which gives me the following error:
Parse error: syntax error, unexpected 'color' (T_STRING) in /usr/www/users/evoluxbwvs/include/phpfunctions.php on line 723
Fixed it by using this as the last line:
$value="<span style='color: " . $color . ";'>".$value."</span>";