Hi,
I'm trying to subtract 6 days from a date in a url parameter (date_param). For example, "http://localhost/somepage?date_p aram=16/08/07".
This is the code that I have, but it's giving the wrong value. Can someone help?
I'm new to PHP.
I'm trying to subtract 6 days from a date in a url parameter (date_param). For example, "http://localhost/somepage?date_p aram=16/08/07".
This is the code that I have, but it's giving the wrong value. Can someone help?
I'm new to PHP.
Code:
<?php $date = $_REQUEST["date_param"]; echo date('d/m/y', strtotime($date.' -6 days')) ?>
Comment