我的PHP数组的第一个值在有值时返回为'null'

I'd really like some help with the following MySQL / PHP problem (maybe bug?)

I'm trying to retrieve and display an array of data from my database using MySQL / PHP, but when I echo out the array, it returns the first value as 'null'.

So, even though the database has the following info:

"Example 1", "Example 2", "Example 3"...

The php echos out:

"null", "Example 2, "Example 3"

I would imagine this would be a common problem, but I haven't managed to find the required information elsewhere on the internet, so I'm hoping you kind folks can help.

My PHP

/* If connection to database, run sql statement. */
if ($conn) {
    $fetch = mysql_query("SELECT column FROM table WHERE approved = '1' ");

    // declare empty array to fill later
    $result = array();

    // make sure the MySQL pointer is looking at the first row
    mysql_data_seek($fetch, 0);


    while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {

        foreach ($row as $value) {

            $row_array = $value;

            // push info into new array with just the value
            array_push($result, $row_array);
        }
    }
}
/* Free connection resources. */
mysql_close($conn);

/* Toss back results as json encoded array. */
echo json_encode($result);

UPDATE

New code courtesy of Mark B:

if ($conn)
{
$sql = "SELECT column_name FROM table WHERE comment_approved = '1' "; 
$query = mysql_query($sql) or die(mysql_error());

$result = array();
while ($row = mysql_fetch_assoc($query)) {
    $result[] = $row['column_name'];

}

}

/* Free connection resources. */
mysql_close($conn);

/* Toss back results as json encoded array. */
echo json_encode($result);

NOTE:

The 'null' problem still occurs with or without the:

 mysql_data_seek($fetch, 0);

as that appears to do nothing.

Any help would be great!

SOLVED

Thanks to Mark B who pointed out that the problem was probably in the database rather than the PHP, it turned out there was the character ` lurking where there should have been a '. This caused the information to appear 'null'.

$sql = "SELECT column FROM table WHERE approved = '1'";
$result = mysql_query($sql) or die(mysql_error());

$data = array();
while($row = mysql_fetch_assoc($result)) {
    $data[] = $row['column'];
}

echo json_encode($data);

You shouldn't have to do the seek, as you've not done anything with the result at the time. And since you're only fetching a single column from the database, there's no need for the inner foreach() loop either.

Try removing the call to mysql_data_seek. I see no reason why the MySQL pointer wouldn't already point to the first row at the first call to mysql_fetch_array.

You could try removing mysql_data_seek($fetch, 0); as the pointer will already be on the first record if you have just made the query.