DBookatay Posted January 28, 2008 Share Posted January 28, 2008 I keep getting an error "Parse error: syntax error, unexpected ';' in /home/.phillipina/dbookatay/carcityofdanbury.com/inventory_search.php on line 415" and can't figure it out. $purDate = $row['pur_dte1'].'-'.$row['pur_dte2'].'-'.$row['pur_dte3']; if ($purDate <= date('m-d-y', strtotime('-10 days')) { $flagClass = "New"; $flagText = "New Arrival"; } Basically, if $purDate is less than or equal to todays date, do this... Quote Link to comment Share on other sites More sharing options...
PersonPerson Posted January 28, 2008 Share Posted January 28, 2008 $purDate = implode("-",$purDate); Quote Link to comment Share on other sites More sharing options...
DBookatay Posted January 28, 2008 Author Share Posted January 28, 2008 $purDate = implode("-",$purDate); How does that help, the error is coming from this line: if ($purDate <= date('m-d-y', strtotime('-10 days')) { Quote Link to comment Share on other sites More sharing options...
PersonPerson Posted January 28, 2008 Share Posted January 28, 2008 You never posted which line the error was coming from, so I wouldn't have known. Anyway, it's pretty self-explanatory. What is a semi-colon doing in an if statement? Quote Link to comment Share on other sites More sharing options...
DBookatay Posted January 28, 2008 Author Share Posted January 28, 2008 Damn I'm stupid! Never mind... Quote Link to comment 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.