> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Thursday, August 20, 2009 3:53 PM
> To: Jonathan Tapicer; PHP General List
> Subject: Re: [PHP] Displaying 2 digit minutes/seconds
>
>
> On Aug 20, 2009, at 2:34 PM, Jonathan Tapicer wrote:
>
> > You can use sprintf or str_pad to fill in with zeros, with sprintf
> > you can do this:
> >
> > echo sprintf('%02d', 5);
>
> Thanks, Jonathan! I learned two new functions today!
> Both work
> great but I think I like sprintf for this application better since
> it's more succinct.
>
> echo sprintf('%02d', $theMinute);
Uh. If you MUST do this nonsense, then at least do this instead and not
"echo sprintf":
printf('%02d', $theMinute);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php