Re: [PHP] Adding zeros to date

2001-10-05 Thread Dimitris Kossikidis
> Sent: Friday, October 05, 2001 12:44 PM Subject: [PHP] Adding zeros to date > Hi, > > is there a easier way to add zeros to date than the script below? (ie to get > 20011005 instead of 2001105). I wrote a long string replace. But it seems > kind of unecessary to me. Is it? > >

Re: [PHP] Adding zeros to date

2001-10-05 Thread Negrea Mihai
if you can't do it with date() use substr("0".$month, -2, 2) On Friday 05 October 2001 09:44, Daniel Alsén wrote: > Hi, > > is there a easier way to add zeros to date than the script below? (ie to > get 20011005 instead of 2001105). I wrote a long string replace. But it > seems kind of unecessary

[PHP] Adding zeros to date

2001-10-05 Thread Daniel Alsén
Hi, is there a easier way to add zeros to date than the script below? (ie to get 20011005 instead of 2001105). I wrote a long string replace. But it seems kind of unecessary to me. Is it? $date_time_array = getdate (time()); $date = $date_time_array[ "mday"]; $month = $date_time_array[ "mon"];