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... Link to comment https://forums.phpfreaks.com/topic/88118-solved-cant-figure-out-this-error/ Share on other sites More sharing options...
PersonPerson Posted January 28, 2008 Share Posted January 28, 2008 $purDate = implode("-",$purDate); Link to comment https://forums.phpfreaks.com/topic/88118-solved-cant-figure-out-this-error/#findComment-450862 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')) { Link to comment https://forums.phpfreaks.com/topic/88118-solved-cant-figure-out-this-error/#findComment-450864 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? Link to comment https://forums.phpfreaks.com/topic/88118-solved-cant-figure-out-this-error/#findComment-450865 Share on other sites More sharing options...
DBookatay Posted January 28, 2008 Author Share Posted January 28, 2008 Damn I'm stupid! Never mind... Link to comment https://forums.phpfreaks.com/topic/88118-solved-cant-figure-out-this-error/#findComment-450867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.