[Nfb-web] is something wrong with this code?

Ryan Mann rmann at blazer.kire.net
Thu Dec 21 15:17:37 CST 2006


Hello.  Can anybody tell me if something is wrong with this code?
PHP says that there is an invbalid value for foreach.
Here is the code.
if(strchr($parsestring,"choice"))
{
$choices=array(substr($parsestring,7));
while(strchr($parsestring,"end of choices")!=0)
{
$choicenum=$choicenum+1;
print $choicenum;
$choices[$choicenum]=substr($parsestring,7);
}
}
print "Now printing the choices."."<br>";
foreach($choices as $choicepos)
{
print $choicepos."<br>";
}

The extra print statements are for debuging purposes.
Thanks for your help.
Ryan



More information about the Nfb-web mailing list