SyntaxFix
Write A Post
Hire A Developer
Questions
$name=array(); while($result=mysql_fetch_array($res)) { $name[]=array('Id'=>$result['id']); // here you want to fetch all // records from table like this. // then you should get the array // from all rows into one array }