Hi,
I would like to populate skills from database.
here is the code I am using. It works fine for populating it in 4 columns and that's what I want but the problem, it's repeating the same skill from first TD into all TDs in the TR.
How can I make it populate the data from the next row?
<h2>Skills</h2><br>
<table align="center" cellpadding="20" cellspacing="0" style="width:100%;">
<?php
include 'includes/connect2db.php';
$mysql_command = "CALL sp_populate_skills()";
$mysql_query = $mysql_connection->prepare($mysql_command);
$mysql_query->execute();
while($mysql_row = $mysql_query->fetch())
{
?>
<tr>
<?php for ($j = 0; $j < 4; $j++) { ?>
<td valign="middle" align="center" style="width: 100%; padding: 20">
<a href="<?php echo $mysql_row['skill_url']; ?>" target="_blank" title="<?php echo $mysql_row['skill_term']; ?>">
<?php echo $mysql_row['skill_term']; ?></a></td>
<?php } $i++; ?>
</tr>
<?php } ?>
</table>