alvin567 Posted May 29, 2012 Share Posted May 29, 2012 How do I check if $val is empty? then if empty I want to set it as a todays date Link to comment https://forums.phpfreaks.com/topic/263302-php-date/ Share on other sites More sharing options...
Psycho Posted May 29, 2012 Share Posted May 29, 2012 if(empty($val)) { $val = time(); } Or use date() with whatever format you fancy Link to comment https://forums.phpfreaks.com/topic/263302-php-date/#findComment-1349398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.