PHP - Evaluating the Score with conditional statements

/*This is a simple program that evaluates the player's score and displays the result to the gamer*/ <?php $score = 25; if ($score >= 60){ echo ' You passed this level '; } elseif ($score <= 30){ echo ' You should practise more before trying again. Use the practise test simulations '; } else { echo ' You failed to complete the level. Please try again '; } ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.