I\'m selecting a single column from a MySQL table with mysql_query(). Is there already a function for getting the results into an array, or will I have to iterate t
mysql_query()
you can do this with mysqli_fetch_all and array_column
$r = mysqli_query($c,"SELECT bug_name FROM bugs WHERE color='red'"); $bug_names = array_column(mysqli_fetch_all($r,MYSQLI_ASSOC),"bug_name");