You are here: Question from php cookbook « PHP Programming Language « IT news, forums, messages
Question from php cookbook

Posted by Mike on 10/15/65 11:34

This is a little snippet from the calendar recipe 3.17. I dont understand
what the $yesterday and $day_secs are for?

If you need more code I can send it,but if you have the book you can see for
yourself.

$yesterday = time() - 86400;

for ($day = 1; $day <= $totaldays; $day++) {

$day_secs = mktime(0, 0, 0, $month, $day, $year);

if ($day_secs >= $yesterday) {

if ($day_highlight && ($day == $this_day)) {

print sprintf('<td align="center" bgcolor="%s">%d</td>',

$opts['today_color'], $day);



Any help will be appreciated

Thanks

Mike

 

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

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