Ahmed Ahmed - 16 days ago 6
PHP Question

PHP loop X amount of times

I have a string called

$columns
which dynamically gets a value from 1 to 7. I want to create a loop of
<td></td>
for however many times the value of
$columns
is. Any idea how I can do this?

Answer
for ($k = 0 ; $k < $columns; $k++){ echo '<td></td>'; }