Jump to content

Parse error: parse error, unexpected T_IS_GREATER_OR_EQUAL, expecting ')' in


Recommended Posts

Parse error: parse error, unexpected T_IS_GREATER_OR_EQUAL, expecting ')' in
getting this error on a foreach
foreach ($lines as $line_num >= $line) {
print "scriptAr.push(\"$line\" );";
}
?>
using it to read a text file>> put in an array and then send array to a java script array.
i can for the life of me see what is wrong any help would be apreciated
You have the > and = in the wrong way around it should be => and not >= so you code should be this:
[code]foreach ($lines as $line_num => $line) {
    print 'scriptAr.push("' . $line . '" );';
}[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.