Skip to content
Advertisement

Create PHP array from MySQL column

mysql_fetch_array will give me an array of a fetched row. What’s the best way generate an array from the values of all rows in one column?

Advertisement

Answer

you could loop through the array, and create a new one, like so:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement