Jump to content

Archived

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

dac

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
if i recall i tried that and it said unexpected double arrow

Share this post


Link to post
Share on other sites

×

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.