如何从查询结果中打印出最低值?

I have

var_dump($row[Price]);

which prints out all prices from my query ($query = "Select * FROM myTable WHERE...")

like this:

string(5) "37.00" string(5) "20.00" string(5) "23.00" string(5) "12.00" string(5) "10.00"

Now: I would like to print (echo) out just the Lowest Value which is "10.00" in this case.

How do I do this?

while ($row = mysql_fetch_array($result))
{
  // Print out the contents of each row into a table
}

Instead of above codes, use following:

$list = mysql_fetch_array($result);

function _getPrice($array) {
  return $array['Price'];
}

$prices = array_map('_getPrice', $list);

echo min($prices);

Alternative [suggest you]

Or you can get MIN with SQL Query like @Teneff said:

SELECT MIN(price) FROM myTable WHERE...

You could add ORDER BY to your query, ORDER BY prices ASC. Then print the first element of the array

You will have to iterate over all strings, convert them to integers and than iterate again to find lowest value. It would be better to use some sort criterion with SQL query and then take first value.