Jump to content

Time based output


chewy

Recommended Posts

Try this

if (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 timestamps

hope this helps
Link to comment
https://forums.phpfreaks.com/topic/35496-time-based-output/#findComment-167944
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.