phpdateformat

In PHP, how to format the date while throwing away the '0' in front of single digit date?


When I do the below code:

date("d/m/y", $date)

It gives me

04/06/15

How can I make it such a way that it will return

4/6/15

What modifications must I do in order to get the desired output? Please advise thanks.


Solution

  • date("j/n/y", $date);
    

    Try this one