Jump to content

[SOLVED] Separating a variable into 2


denhamd2

Recommended Posts

heres the part in question:

 

//sets the first day of the month to 1
$day_num = 1;

//count up the days, untill we've done all of them in the month

while 
( $day_num <= $days_in_month ) 
{ 

echo "<td>$day_num<br><input name=\"$day_num$month$year\" type=\"checkbox\" value=\"yes\"></td>\n"; 
$day_num++; 
$day_count++;

here is the rest of the code:

 

//sets the first day of the month to 1
$day_num = 1;

//count up the days, untill we've done all of them in the month

while 
( $day_num <= $days_in_month ) 
{ 

echo "<td>$day_num<br><input name=\"$day_num$month$year\" type=\"checkbox\" value=\"yes\"></td>\n"; 
$day_num++; 
$day_count++;

//Make sure we start a new row every week
if ($day_count > 7)
{
echo "</tr><tr>";
$day_count = 1;
}

} 


//Finaly we finish out the table with some blanks if needed
while 
( $day_count >1 && $day_count <=7 ) 
{ 
echo "<td> </td>"; 

$day_count++;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.