Ey.. I need to make an array of an sql table with an ID and an name column, where id=key and name=value. Any easy way of getting around this exept a whole lot of for loops? 🆒
$result = mysql_query('SELECT id, name'); $array = array(); while ($row = mysql_fetch_assoc($result)) { $array[$row['id']] = $row['name']; }