reformatted if.php code.