嗨,我需要从数据库创建一个数组;myTable 看起来像这样
id | name | address |
-------------+------------+---------------
1 | Peter | Union Streeet|
2 | John | King Street |
然后我有 sql 将从数据库中选择值
$record=mysql_query("SELECT * FROM myTable");
while($row=mysql_fetch_assoc($record)){
//fill array how to fill array that will look like bellow from database???
}
我需要创建看起来像这样的数组
$list = array (
array('$row[id]', '$row[name]', '$row[address]'),
// array('$row[id]', '$row[name]', '$row[address]')
// FOR EACH LINE FROM DATABASE NEW NESTED ARRAY
);