Retooling of if.php to combine for if/else statments