I'm trying to get this weekend in php.
I get the current date by code :
$start_date = date("Y-m-d H:i:s", time());
How I can get the current weekend depend on the curent date? Thank you!
PHP strtotime function is magic, most of people don't know but you can do a lot of things with this function.
$start_date = date("Y-m-d H:i:s", strtotime('next Saturday'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With