1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

$_get Date Function

Discussion in 'PHP' started by sam20e, Feb 13, 2013.

  1. #1
    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
    SEMrush
    How can i use dateformat in this code?

    Thanks
     
    sam20e, Feb 13, 2013 IP
    SEMrush
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,731
    Likes Received:
    26
    Best Answers:
    13
    Trophy Points:
    175
    #2
    EricBruggema, Feb 13, 2013 IP
    ryan_uk likes this.
  3. sam20e

    sam20e Member

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #3
    thanks
     
    sam20e, Feb 13, 2013 IP
  4. EricDoc

    EricDoc Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    or you can use str_replace
    ex:
    $arr = array('01', '02');
    $arr1 = array('Jan', 'Sec');
    str_replace($arr1, $arr);
     
    EricDoc, Feb 14, 2013 IP