English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm receiving the above error, and here's the two parts that are interacting with each other (a page of all switches for controlling the application):

function checked($c1, $c2)
{
switch ($c1) {
case 0:
$c2=='value="OFF"';
break;
case 1:
$c2=='value="ON"';
break;
}
}
?>





$c1==$scheduler
checked($c1, $c2);
echo "";
?>





What's wrong in the code?

2007-11-28 19:38:24 · 4 answers · asked by Geek 2 in Computers & Internet Programming & Design

4 answers

after ( $c1==$scheduler ) in part two put a ; (semicolon)

$c1==$scheduler; // before change: $c1==$scheduler
checked($c1, $c2);
echo "";
?>

2007-11-28 19:52:09 · answer #1 · answered by guy18iran 2 · 0 0

$c2=='value="OFF"';
This statement is NOT an assignment. It is a condition statement that is returning a boolean but that boolean is going nowhere.
All your assign statements should have the following form.

$c2='value="OFF"';

2007-11-29 03:57:01 · answer #2 · answered by AnalProgrammer 7 · 0 0

u missed ; after $c1==$scheduler
this is the main reason

2007-11-29 04:30:26 · answer #3 · answered by Shree J 2 · 0 0

Check your data types... i think that's what "Parse" means (in C#.NET) i don't know PHP...

2007-11-29 04:06:02 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers