I'm wondering if there's a way to make it go through all of the rows without having a while loop? Here's the code I'm using (not that it really matters):
<?php while($i <= 14)
{
$date = strtotime('') + (86400 * $i);
$dateCheck = date('l', $date);
while($availRow = mysql_fetch_array($availability)) {
if($dateCheck != "Friday" && $dateCheck != "Saturday" && $dateCheck != "Sunday") {
if($date >= $availRow[out_on] && $date <= $availRow[due_date]){ } else { ?>
<option value="<?php echo $date; ?>" name="<?php echo date('YmdHis', $date); ?>"><?php echo date("F d \[ l \]", $date); ?></option>
<?
}
}
$i++;
}
}
I need it to be able to go through the full 14 times no matter how many rows are in the database, but still check every row.