Process Array contents I've done a database query which returns the results in the following array:

Array ( [0] =&gt; stdClass Object ( [field_latitude_value] =&gt; 25.2000000000 ) [1] =&gt; stdClass Object ( [field_latitude_value] =&gt; 51.9456801568 ) [2] =&gt; stdClass Object ( [field_latitude_value] =&gt; 51.9471747475 ) [3] =&gt; stdClass Object ( [field_latitude_value] =&gt; 51.9471218425 ) )


How do I process this information so I get just the values instead of the added keys? I.e a list of said values.

I'm currently using the following code, which gives me a recoverable fatal error:

&lt;?php

$query = db_query('SELECT field_latitude_value FROM {field_data_field_latitude}')-&gt;fetchAll();


print_r($query); 
foreach($query as $value){
    echo $value;
};?&gt;
Instead of fetchAll(), try fetchCol(), like this:


$latitude_values = db_query("SELECT field_latitude_value FROM {field_data_field_latitude}")->fetchCol();