Hey,

I need some help with working out if a timestamp is today or not...

Eg - 1318245850 is Today
- 1286709850 isnt today...

Dan

Recommended Answers

All 2 Replies

Use the following:

<?php
$timestamp='1318245850';
if (mktime(0,0,0)<$timestamp) {
echo $timestamp.' is today.';
} else {
echo $timestamp.' is not today.';
}

Perfect Thanks =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.