Hello,
probably an easy one, is there an equivalent of MySQL’s NOW() in PHP so I can quickly compare the current date with one from a database?
Cheers,
Jon
Hello,
probably an easy one, is there an equivalent of MySQL’s NOW() in PHP so I can quickly compare the current date with one from a database?
Cheers,
Jon
Use the date function:
$date = date('Y-m-d H:i:s');
Though if comparing, it’d be better to do that in the query itself.