dac Posted July 7, 2006 Share Posted July 7, 2006 Parse error: parse error, unexpected T_IS_GREATER_OR_EQUAL, expecting ')' ingetting 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 Quote Link to comment https://forums.phpfreaks.com/topic/13976-parse-error-parse-error-unexpected-t_is_greater_or_equal-expecting-in/ Share on other sites More sharing options...
wildteen88 Posted July 8, 2006 Share Posted July 8, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/13976-parse-error-parse-error-unexpected-t_is_greater_or_equal-expecting-in/#findComment-54736 Share on other sites More sharing options...
dac Posted July 8, 2006 Author Share Posted July 8, 2006 if i recall i tried that and it said unexpected double arrow Quote Link to comment https://forums.phpfreaks.com/topic/13976-parse-error-parse-error-unexpected-t_is_greater_or_equal-expecting-in/#findComment-54979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.