- header: documentation ( source)
<?php
$row = array (2000,7000,3000);
$fuzzyprocessormax = 6000;
$fuzzyprocessormin = 5000;
$arrlength = count($row);
for($x=0; $x < $arrlength; $x++)
{
// Hitung fuzzy processor min
if ($row <= $fuzzyprocessormin )
{
echo 'Kebutuhan fuzzy 0' ;
echo $arrlength;
die();
}
else if ($fuzzyprocessormin <= $row or $row <= $fuzzyprocessormax )
{
$rekomendasi = ($fuzzyprocessormax - $row ) / ($fuzzyprocessormax - $fuzzyprocessormin);
echo 'Kebutuhan fuzzy '.$rekomendasi; die();
echo $arrlength;
}
else if ($row >= $fuzzyprocessormax)
{
echo 'Kebutuhan fuzzy 1';
echo $arrlength; }
else
echo header("Location: ../processor.html");
}
?>