Jump to content

[SOLVED] PHP Date question


HughbertD

Recommended Posts

Sorry - here is my current attempt

 

<?php
$startdate = mktime(0,0,0,date("m"),date("d")-7,date("Y"));
echo(date ("Y/m/d", $startdate));
?><br>
<?php

$enddate = mktime(0,0,0,date("m"),date("d")+7,date("Y"));
echo(date ("Y/m/d", $enddate));
?><br>
<?php
echo (date("Y/m/d"));

if (date > $startdate && date < $enddate)
{
echo ("STUFF");
}
else echo  ("<br>LAMO");




?>

<?php

$startdate = mktime(0,0,0,date("m"),date("d")-7,date("Y"));
//echo date("Y/m/d", $startdate);

$enddate = mktime(0,0,0,date("m"),date("d")+7,date("Y"));
//echo date("Y/m/d", $enddate);

$now = mktime(0,0,0,date("m"),date("d"),date("Y"));

if ($now > $startdate && $now < $enddate)

{

echo ("STUFF");

}

else 

{ 

echo  ("LAMO");

}

?>

 

Try this

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.