Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Date Problem Re: PHP Date Problem

#82876
xyzoblivion
Member

Wow .. at last i have done it ! you guys may want to look at this ..

function excludeSundays($dates_range)
{
$dates_wo_sundays = array();

for($i=0;$i {
$dates2 = explode(“/”,$dates_range[$i]);
$dates_range[$i] = date(‘d/m/y’,mktime(0,0,0,$dates2[1],$dates2[0],$dates2[2]));
$dates2 = explode(“/”,$dates_range[$i]);
$weekday = date(‘l’,strtotime($dates2[1] . “/” . $dates2[0] . “/” . $dates2[2],$date));

if($weekday != “Sunday”)
{

$dates_wo_sundays[$i] = $dates_range[$i];
//echo $date . ” is ” . $weekday . “
“;
}
}
return $dates_wo_sundays;
}