function voltageTable() { $volts = getMaxVoltage(); $degrade = 0; $table = ""; $table = "\n<table id='torque-degrade'>"; $table .= "\n<tr>"; do { $table .= "\n<th>@" . number_format($volts, 1) . " Volts</th>"; $volts -= 1; } while ($volts > 4.4); $table .= "\n</tr>"; $volts = getMaxVoltage(); $table .= "\n<tr>"; do { $table .= "\n<td>" . number_format(doConversion(getConvertValue()) - doConversion(getConvertValue()) * $degrade, 2) . "</td>"; $volts -= 1; $degrade += 0.15; } while ($volts > 4.4); $table .= "\n</tr>"; $table .= "\n</table>\n"; return $table; }
<link rel="apple-touch-icon" href="./Media/Images/csumb-logo-white.png"> </head> <body> <div id="page-container"> <header> <h1>Servo Torque Converter</h1> </header> <nav></nav> <div id="wrapper"> <p id="converted"> <span><?php echo doConversion(getConvertValue()); ?> </span> </p> <p> <?php echo voltageTable(); ?> </p> </div><!-- End wrapper --> <footer> <figure> <img class="footerLogoImage" src="./Media/Images/csumb-logo-white.png" /> </figure> <p>