i want to make a table that on the first column consist of name from database and on the second column consist of value from an array. this is what i have
<table>
<tr>
<?php $arr=array(3,5,2,4,1);
$name= mysql_query("SELECT name FROM table")
foreach ($arr as $rs){
while($n=mysql_fetch_array($name)){ ?>
<td><?=$n['name']?></td>
<td><?=$rs?></td>
</tr>
<?php } } ?>
</table>
i need an output like
name_a 3
name_b 5
name_c 2
name_d 4
name_e 1
thank you in advance.