o, what the hell. Here it is, dont complain if its wrong
<?php
$min = 100000;
foreach (file("Inwine.txt") as $line)
{
echo "$line<br>";
$params = explode(" ", $line);
$price = (float) substr($params[count($params) - 1], 1);
if ($price > 0)
{
$count++;
$avg += $price;
if ($price > $max)
{
$max = $price;
$maxname = $line;
}
if ($price < $min)
{
$min = $price;
$minname = $line;
}
}
}
$avg = number_format($avg / $count, 2);
echo "<hr>";
echo "Min: $minname<br>";
echo "Max: $maxname<br>";
echo "Avg: $$avg<br>";
?>