would love some help with this php script using the date fun
Posted: Wed Jun 20, 2012 8:50 am
Hi- I would love some help with this php script using the date function. We would like to see is today's date followed by the date of archived they just clicked on -- sort of like tellin g the person, "Today is June 20, 2012. The archived story you are reading is May 31, 2009".
Right now what we are seeing as a result of this is
June 20, 2012090531
Not sure why we are unable to get the May 31, 2009 in the same format. Also, as a newbie, it would be so helpful if you would also help put in the words for me "archived story you are reading is:" followed by the archive date.
Thanks so much in advance for your expertise and time.
Right now what we are seeing as a result of this is
June 20, 2012090531
Not sure why we are unable to get the May 31, 2009 in the same format. Also, as a newbie, it would be so helpful if you would also help put in the words for me "archived story you are reading is:" followed by the archive date.
Thanks so much in advance for your expertise and time.
Code: Select all
<?php $var1 = $_GET['vname'];
$var2=date('F d Y', strtotime($var1));
echo $var2;
echo $var1; //this is date of archive
?>
[php]