You are here: Re: looping until today « PHP Programming Language « IT news, forums, messages
Re: looping until today

Posted by Geoff Berrow on 04/01/06 10:57

Message-ID: <1143876015.314691.188990@z34g2000cwc.googlegroups.com> from
pauld contained the following:

>it goes on until the day is 99 and then loops again.
>so how do I tell it that $enddate is in the same date format asthe
>start date

Use timestamps

$enddate=strtotime('now');

for ($dl=strtotime('2006-3-1');$dl < $enddate;$dl=$dl+24*60*60)
{
print date('Y-m-d',$dl)."<br>";

}
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация