The answer is YES. Here's the example.
<?php
// switch example using strings
$creature="dragon";
switch ($creature){
case "rat":
echo "a $creature goes: eek eek eek";
break;
case "dragon":
echo "a $creature goes: nice to eat you";
break;
case "pig":
echo "a $creature goes: oink oink oink";
break;
default:
echo "I have not heard of this creature";
break;
}
?>
// switch example using strings
$creature="dragon";
switch ($creature){
case "rat":
echo "a $creature goes: eek eek eek";
break;
case "dragon":
echo "a $creature goes: nice to eat you";
break;
case "pig":
echo "a $creature goes: oink oink oink";
break;
default:
echo "I have not heard of this creature";
break;
}
?>
Another posts included in "PHP"
| foreach loop (0) | 2007/10/16 |
| Posting to a Wordpress Blog Via XMLRPC Using Blogger API (1) | 2007/12/15 |
| How to post blog content by metaweblog API ? (3) | 2008/01/02 |
| PHP Switch Example (0) | 2007/10/16 |
| How to send email in PHP ? (0) | 2007/10/16 |
| How to pass variables via url (0) | 2007/10/16 |
| How to declare array in PHP like C/C++ (0) | 2007/10/16 |
| PHP date and time formatting (0) | 2007/10/16 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 02:57
moneyideas
-
Subject different money making ideas
2010/01/29 11:53
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed