Jump to content

[SOLVED] Making a table with loop


bbmak

Recommended Posts

I am making a scheduler, but i have some trouble with creating the full table with the loop.

 

here is my code

echo '<table border=2>';

 

$i = 1;

$j = 7;

 

$m = 0;

$a = 24;

 

echo '<tr>';

echo '<td></td>';

while($i < $j) {

echo '<td>';

$date = mktime(0, 0, 0, date("m"), date("d")+"$i", date("y"));

echo date("m/d/y", $date);

$i++;

echo '</td>';

}

echo '</tr>';

 

 

while($m < $a) {

 

$n = $m +1;

echo "<tr><td>" . $m . ":00 - " . $n . ":00 </td></tr>";

$m++;

}

 

echo '</table>';

 

here is my page

http://mak.ghaben.com/scheduler/

 

I want the table extend all the way.

 

Little help please

Link to comment
https://forums.phpfreaks.com/topic/85760-solved-making-a-table-with-loop/
Share on other sites

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.