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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/263302-php-date/#findComment-1349398 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.