0) {
$part_size = $rest / $parts;
for ($i = 0; $i < count($lengths); $i++) {
$length = $lengths[$i];
if (substr($length,strlen($length)-1,1) == "*") {
$values[$i] = $part_size * max(1,substr($length,0,strlen($length)-1));
};
};
};
// Fix over/underconstrained framesets
$width = array_sum($values);
if ($width > 0) {
$koeff = $total / $width;
for($i = 0; $i < count($values); $i++) {
$values[$i] *= $koeff;
};
};
return $values;
}
?>