chewy Posted January 24, 2007 Share Posted January 24, 2007 HIHow would I do the following,if date-time is between these two valuesecho stringelse if date-time is between these two valuesecho stringelse if date-time is between these two valuesecho... Link to comment https://forums.phpfreaks.com/topic/35496-time-based-output/ Share on other sites More sharing options...
c_shelswell Posted January 24, 2007 Share Posted January 24, 2007 Try thisif (strtotime($row['date']) >= $startDate[$sm] && strtotime($row['date']) <= $endDates[$sm]){ echo $string;}i was using mine for a load of dates hence the arrays. It the "strtotime" that makes it easy to compare the dates by turning them in to unix timestampshope this helps Link to comment https://forums.phpfreaks.com/topic/35496-time-based-output/#findComment-167944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.