(PHP, MySQL) Can I convert individual fields of a 'mysql_query' to arrays?
Likely a remedial question, but in all my days as a PHP user I have yet to encounter an answer.  Basically, is there any way to grab a single field of a "mysql_query" as an array?  For instance say I have the following:

    $query = "Select id,first_name,last_name FROM people";
    $result = mysql_query($query);
    
Is there any way to grab each (id, first_name, last_name) as individual arrays without iterating through the recordset?  Can I say something like:

    $ids = field_to_array($result['id']);
    $first_names = field_to_array($result['first_name']);
    $last_names = field_to_array($result['last_name']);

As I said, in the past I've always simply built the arrays as needed, but an existing method would be handy.

Best.
(PHP, MySQL) Can I convert individual fields of a 'mysql_query' to arrays?
===

Likely a remedial question, but in all my days as a PHP user I have yet to encounter an answer.  Basically, is there any way to grab a single field of a "mysql_query" as an array?  For instance say I have the following:

    $query = "Select id,first_name,last_name FROM people";
    $result = mysql_query($query);
    
Is there any way to grab each (id, first_name, last_name) as individual arrays without iterating through the recordset?  Can I say something like:

    $ids = field_to_array($result['id']);
    $first_names = field_to_array($result['first_name']);
    $last_names = field_to_array($result['last_name']);

As I said, in the past I've always simply built the arrays as needed, but an existing method would be handy.

Best.