WordPress how to split month and day date into two pieces

How can I split the “month” and “day” date into two seperate pieces so I can place them under each other like this:

enter image description here

Related posts

Leave a Reply

2 comments

  1. To obtain the current day you can:

    echo date('d');
    

    and for current month:

    echo date('m');
    

    in a short textual representation of a month, three letters:

    echo date('M');
    

    But if you have the date already in a string variable you can for day:

    echo date('d',strtotime('11/26/2011'));
    

    and for month:

    echo date('M',strtotime('11/26/2011'));
    

    For complete references of the functions: