I am trying to get all the results from 1 column into an array. I tried the following below but all I get from the output is "Array".
$sql = "SELECT pickID FROM picks WHERE userID = 2 ";
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$i = 0;
$pickArray = array();
foreach($result as $row) {
$pickArray[$i] = $row['pickID'];
$i++;
}
echo $pickArray;
print_r($pickArray)instead ofecho.mysql_fetch_array()->Returns an array that corresponds to the fetched row and moves the internal data pointer ahead. If more than 1 value is desired, remove$result = mysql_fetch_array($query);and changeforeach($result as $row) {towhile($row = mysql_fetch_array($query)){