you could loop through the array, and create a new one, like so:
$column = array();
while($row = mysql_fetch_array($info)){
$column[] = $row[$key];
//Edited - added semicolon at the End of line.1st and 4th(prev) line
}
More Related Contents:
- Sign in form always showing "Wrong Credentials"
- Prevent creating duplicate entries in PHP
- i have stored array in database as a string how can retrieve that array?
- Insert array into MySQL database with PHP
- Sum values of multidimensional array by key without loop
- I have an array of integers, how do I use each one in a mysql query (in php)? [duplicate]
- Save PHP array to MySQL?
- Notice: Array to string conversion in
- mysql_fetch_array, mysql_fetch_assoc, mysql_fetch_object
- How get all values in a column using PHP?
- mysql select query within a serialized array
- PDO fetch one column from table into 1-dimensional array
- Get all mysql selected rows into an array
- Select from mysql table WHERE field=’$array’?
- MySQL query using an array [duplicate]
- How to insert json array into mysql database
- Why do I get “Resource id #4” when I apply print_r() to an array in PHP? [duplicate]
- PHP/SQL Insert Error when using Named Placeholders
- Save array in mysql database
- MySQL PHP – SELECT WHERE id = array()? [duplicate]
- How can I sort arrays and data in PHP?
- How do I set ORDER BY params using prepared PDO statement?
- Can you add an if statement in ORDER BY?
- How to trim white spaces of array values in php
- MySQL (or PHP?) group results by field data
- PHP: do arrays have a maximum size?
- How do I use array_unique on an array of arrays?
- PHP array printing using a loop
- PDO Cannot execute queries while other unbuffered queries are active
- MYSQL select a piece of a string and order by that piece