Hello All,
I have fetched array from database,
it is two dimentinal array.
and want to print it into html table.
But when print it's need attribute while printing it.
here is code:
<tr>
<th>Sr.No.</th>
<th>Skill type</th>
<th>Skill Name</th>
<th>Project</th>
<th>Practice</th>
<th>Description </th>
</tr>
<?
$skills_1=[HERE I HAVE FETCHED ARRAY FROM DATABASE];
?>
<table class='GoalsettingTable'>
Skills used by employee:
<tr>
<th>Sr.No.</th>
<th>Skill type</th>
<th>Skill Name</th>
<th>Project</th>
<th>Practice</th>
<th>Description </th>
</tr>
<?
if(sizeof($skills_1)>0)
{
$array_size=sizeof($skills_1);
for ($index=0;$index < $array_size ;$index++)
{
echo "<tr>";
for ($inner_index=0;$inner_index < 6 ;$inner_index++)
{
echo $index;
echo $skills_1[$index]['skill_id'];
echo $skills_1[$index]['skill_id'];
echo $skills_1[$index]['practice'];
echo $skills_1[$index]['project'];
}
echo "</tr>"; */
}
}
?>
</table>
But its print incorrect.
it is printing each array in each <td>
I want to print inner loop like echo "<td>".$skills_1[$index][$inner_index]."</td>";
but it is not printing because of attribute.
how can i print this?