hi i use this : $date_new=$_GET['year']."-".$_GET['month']; from a form and i used to display the value like this : <b>Captured Date :</b> <?php echo $date_new; ?> Its working fine, how ever the output it like = 2013-01. I want it to be 2013-Jan How can i use dateformat in this code? Thanks
Read the manual http://www.php.net/manual/en/function.strtotime.php to convert your $_GET date to a timestamp http://www.php.net/manual/en/function.date.php convert the timestamp to current month! hope you can figure this out!
or you can use str_replace ex: $arr = array('01', '02'); $arr1 = array('Jan', 'Sec'); str_replace($arr1, $arr);