note 37352 added to control-structures.switch
| From: | eddie at noveltyneckties dot com | Date: | Tue, 11 Nov 2003 22:07:54 +0000 |
| Subject: | note 37352 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60265@lists.php.net to get a copy of this message | ||
Here's a script that will tell you what an abbreviation means (not all abbreviations). The
first part would be abbrev=. Put your language right there. Also, other things work, too.
<?php
if ($abbrev == html) {
print "HTML stands for HyperText Markup Language.";
} elseif ($abbrev == asp) {
print "ASP stands for Active Server Pages.";
} elseif ($abbrev == http) {
print "HTTP stands for HyperText Transfer Protocol.";
} elseif ($abbrev == https) {
print "HTTPS stands for HyperText Transfer Protocol Secure.";
} elseif ($abbrev == us) {
print "U.S. stands for United States.";
} elseif ($abbrev == usa) {
print "U.S.A. stands for United States of America.";
} elseif ($abbrev == url) {
print "URL stands for Uniform Resource Locator.";
} elseif ($abbrev == uk) {
print "U.K. stands for United Kingdom.";
} elseif ($abbrev == php) {
print "PHP stands for PHP: Hypertext Processor.";
} elseif ($abbrev == biz) {
print "BIZ stands for Business.";
}
switch ($abbrev) {
case html:
print "HTML stands for HyperText Markup Language.";
break;
case asp:
print "ASP stands for Active Server Pages.";
break;
case http:
print "HTTP stands for HyperText Transfer Protocol.";
break;
case https:
print "HTTPS stands for HyperText Transfer Protocol Secure.";
break;
case us:
print "U.S. stands for United States.";
break;
case usa:
print "U.S.A. stands for United States of America.";
break;
case url:
print "URL stands for Uniform Resource Locator.";
break;
case uk:
print "U.K. stands for United Kingdom.";
break;
case php:
print "PHP stands for PHP: Hypertext Processor.";
break;
case biz:
print "BIZ stands for Business.";
break;
}
?>
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37352
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37352&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37352&report=yes
Search -- http://master.php.net/manage/user-notes.php