Another solution, which transforms the two dimensional array to a one dimensional with the same name(the actual work is done in line 10):
<?php
$array = array(
array("filename","uploads/testing1.txt"),
array("filename","uploads/random.txt"),
array("filename","uploads/mytest.docx"),
array("filename","uploads/testing2.php"),
array("filename","uploads/atest.txt"),);
echo "old contents of array <br />";
print_r($array);
foreach ($array as &$temp) $temp = $temp[1];
echo "<br /><br />new contents of array<br />";
print_r($array);
?>
$query = $db->simple_select('table', 'column', 'where clause');
while ($result = $db->fetch_field($query, 'column')) {
$results[] = $result;
}
print_r($results);
This is the simplest and neatest method I could think. You don't need to manipulate arrays if you can make them look the way you want them to be as the query runs.