unexpected T_STRING in …_jumi/jumi.php(25)

A multipurpose module, plugin and component

unexpected T_STRING in …_jumi/jumi.php(25)

New postby actus » Fri May 27, 2011 12:53 am

Below are are two different pieces of code. The first one works the second one does not. I am using the component.
This works.
Code: Select all
foreach ($server_list as $list) {
if ($list->attributes()->status == 0) {
    $server_status = "disabled";
} elseif ($list->attributes()->status == 1) {
    $server_status = "up";
} elseif ($list->attributes()->status == 4) {
    $server_status = "Down";
} else {
   $server_status = "Unknown";
}
echo "Server Name: ".$list->attributes()->name." Status is: ". $server_status."</br>";
}


This version I receive the following error: unexpected T_STRING in /var/www/html/components/com_jumi/jumi.php(25) : eval()'d code on line 23

Code: Select all
foreach ($server_list as $list) {
if ($list->attributes()->status == 0) {
    $server_status = "<font color="black">disabled</font>";
} elseif ($list->attributes()->status == 1) {
    $server_status = "<font color="green">Up</font>";
} elseif ($list->attributes()->status == 4) {
    $server_status = "<font color="red">Down</font>";
} else {
   $server_status = "<font color="blue">Unknown</font>";
}
echo "Server Name: ".$list->attributes()->name." Status is: ". $server_status."</br>";
}


Thank in advance.
actus
 
Posts: 1
Joined: Thu May 26, 2011 11:03 pm

Return to Jumi

Who is online

Users browsing this forum: No registered users and 5 guests

cron