for ($i=0; $i<10; $i++) {
if ($choices($i)) {
if ($selection(0)=='first'){
$selection(0)= $choices($i); // line 62
}
else{ $selection(1) = $choices($i);
}
echo "ctr " . $ctr . $choices($i) ."<br />";
}
}
views:
26answers:
2
A:
What is $selection
? Unless it contains the name of a function, you are doing something wrong. Same with $choices
.
Perhaps you are confusing array notation []
with function notation ()
?
Jason McCreary
2010-08-10 01:55:36
+1
A:
In PHP, use square brackets for array indices.
for ($i=0; $i<10; $i++) {
if ($choices[$i]) {
if ($selection[0]=='first') {
$selection[0] = $choices[$i]; // line 62
} else{
$selection[1] = $choices[$i];
}
echo "ctr " . $ctr . $choices[$i] ."";
}
}
Borealid
2010-08-10 01:56:11