PHP date(): minutes without leading zeros

Bojangles picture Bojangles · Jan 9, 2011 · Viewed 47.6k times · Source

I'd like to know if there is a formatting letter for PHP's date() that allows me to print minutes without leading zeros, or whether I have to manually test for and remove leading zeros?

Answer

AbdullahC picture AbdullahC · Jan 9, 2011

Use:

$minutes = intval(date('i'));