How to Use PHP to Make a Switch for HTML5 and CSS3 Programming
Often, you run across a situation in HTML5 and CSS3 programming where you have one expression that can have many possible values. You can always use the structure to manage this situation, but PHP supplies another interesting option.
The code for this program uses the switch structure. Take a look at how it’s done:
<p>Ask the magic 8 ball a yes or no question!</p>
$yourNumber = rand(1,8);
print "<p><img src="images/8ball1.png" alt = "fat chance" /></p>";