Reply to Re: Time occurs between two time

Your name:

Reply:


Posted by Jerry Stuckle on 08/03/07 11:37

Kesavan wrote:
> I need a function such it returns true when current time occurs
> between the parameters.
>
> function checkTime($time1,$time2){
> $nowTime=date("H:i:s");
>
> //MY LOGIC IS
>
> if( $time1>$nowTime && $time2<$nowTime)
>
> ///
>
> return true;
> else
> return false;
>
> }
>
> plz guide me the function run.
>

You can't compare times as strings and expect it to work. You need to
first convert them to a numeric value, i.e. unixtime format.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original 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

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