Monday, July 31, 2017

Year we go!

She really couldn't think of another way to count down a year...?


echo '<option value="'.date('Y').'">'.date('Y').'</option>';
for ($i=1; $i<=100; $i++) {
   $year_wanted='-'.$i.' year';
   $year_inpast=date('Y',strtotime($year_wanted));
   echo '<option value="'.$year_inpast.'">'.$year_inpast.'</option>';
}

Wednesday, July 26, 2017

No problems here

if ( count($set2) >= 1 )
{
    $test = 0;
}
else
{
    $test = 0;
}

They really wanted an array

$data = array();
$data = array(
    'patient_id' => $id,
    'video_id' => $videoid,
    'created_date' => $date . ' ' . $time,
    'created_by' => 0,
    'sch_id' => $schid
);

if ( is_array($data) !== false )
{
...