function unCamelCase($string) { $arr = explodeCase($string); return implode(" ", $arr); }
<?php if (!empty($_GET['city'])) { ?> <header><h1>Licensing and other data about <?php print $safeLocation; ?> </h1></header> <section class="tests"> <header><h1>Broadband tests</h1></header> <dl> <?php foreach ($tests as $test => $value) { //explodeCase changes camel case to an array, implode puts it back into a sentence. and then uppercase first letter $testFormatted = ucwords(implode(' ', explodeCase($test, false))); $valueFormatted = bytes($value); // show kb or mb if appropriate print "<dt>{$testFormatted}</dt><dd>{$valueFormatted}</dd>"; } ?> </dl> <p>This section is powered by the FCC's Broadband Test API</p> </section> <?php } ?>