How do you set an expire date in php?

jt66250

New member
I tried this code but it doesnt seem to work.

<?php
$end_date = strtotime('2:40pm March 31, 2010');
$now = time();

if ($end_date < $now) {
?>
<p>the text for a limited time</p>
<?php
} else {
?>
<p>the text after the limited time text expires</p>
<?php
}
?>
 
Back
Top