Jump to content


Photo

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


  • Please log in to reply
2 replies to this topic

#1 dac

dac
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 July 2006 - 07:48 PM

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

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 July 2006 - 11:47 AM

You have the > and = in the wrong way around it should be => and not >= so you code should be this:
foreach ($lines as $line_num => $line) {
    print 'scriptAr.push("' . $line . '" );'; 
}


#3 dac

dac
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 08 July 2006 - 11:37 PM

if i recall i tried that and it said unexpected double arrow




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users