0
嗨,我需要從數據庫創建一個數組; myTable的看起來像這樣數據庫中的數組PHP
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
);