full PSI / KPA / BAR transform list

full PSI / KPA / BAR transform list

Post by tt »

Code: Select all

<?PHP

        for ($psi=1.0; $psi<=300; ($psi >= 80 ? $psi += 10 : $psi+=0.5))
        {
                $bar = $psi * 0.069;
                $kpa = intval($bar * 100);

                printf("(%.1f PSI) == (%d KPA) == (%.4f BAR)", $psi, $kpa, $bar);
                echo "\n";

        }
?>