i have to find out the minimum value in the array.
Well, if you insist you could use:
$count = count($array);
if ($count > 0) {
$lowest = $array[0];
for ($i = 1; $i < $count; $i++) {
if ($array[$i] < $lowest) {
$lowest = $array[$i];
}
}
} else {
$lowest = NULL;
}
... or you could take my suggestion and use [man]min/man.