I'm using this code to assign data from a db into a 2-D array:
$xal_rsult=mysql_query("SELECT * FROM `data`");
while ($row = mysql_fetch_assoc($xal_rsult)) {
$user=$row['UserID'];
foreach ($row as $key => $value) {
$xal_db_data[$user][$key] = $value;
}
}
Is there a quicker way to do this?
Would this work:
$user=$row['UserID'];
$xal_db_data[$user] = $row;