I'm already substr all the days to 1 letter but I would like only Thursday to be two letters, right now my loop skips weekends and functions properly for a two week out period from today's date.
$lastmonday=strtotime("-".(date("N")-1)." days");
$end=strtotime("+14 days", $lastmonday);
$datestr = "";
for($i = 1; $i < 14; $i++)
{
$curr = strtotime("+".$i." days");
$weekday = date("N", $curr);
if ($weekday > 5) continue;
$datestr .= "sum(case when DATEDIFF(dd,cast(GETDATE() as date),cast(a.follow_up as date))='$i' then 1 else 0 end)
'" . substr(date('D', $curr), 0, 1).'<br>' . date('n/j', $curr) . "',";
}
The problem is Monday - Friday are all being substr to 1. Still new to substr and i know it's very useful. Additionally, I'm just not sure how i can stop the loop at Wednesday and substr Thursday to two letters and than back to one letter for Friday.
Would i break the loop and than use the control structure "continue" again, like i'm doing for the $weekday variable?