Something
public text v1 · immutablepublic function createCalendar($month, $year, $start=1)
{
$days = array();
for($i=1;$i<=$this->getDays($month,$year);$i++)
{
$dw = $this->getDay($i,$month, $year);
if($start=="1" && $dw=="0")
$dw = "7";
$days[$dw][] = $i;
}
($i=1)?$stop="7":$stop="6";
echo $this->getDayOne($month,$year);
for($i=1;$i<=7;$i++)
{
if(!in_array("1",$days[$i]) && $i < $this->getDayOne($month,$year))
{
array_push($days[$i], 0);
}
}
ksort($days);
//$this->printr($days);
return $days;
}