On Wednesday 17 July 2002 14:55, Manisha wrote:
> I am writing one program -
>
> I want to display some text on web. This text should appear for limited
> period e.g from 20th July 12pm till 25th July 3pm. After 25th July 3pm the
> text should disappear from screen.
>
> I tried to look for date comparison / string conversion to date etc, I got
> lot info but could not figure out which would be best for above (rather how
> can I do it).
>
> Anybody can share some expert comments please ?

1) Use strtotime() to convert your start and end dates to unixtimestamps. 

2) Use time() to get the current unixtimestamp. 

3) Use the standard less-than (<), greater-than (>) comparison operators on 
the above 3 items to decide whether or not to display the text.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
A chronic disposition to inquiry deprives domestic felines of vital qualities.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to