mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added an example for using switch with string arguments.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164127 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4fa2821921
commit
a21beaec52
1 changed files with 19 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.96 $ -->
|
||||
<!-- $Revision: 1.97 $ -->
|
||||
<chapter id="language.control-structures">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -835,6 +835,24 @@ case 2:
|
|||
break;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
switch ($i) {
|
||||
case "apple":
|
||||
echo "i is apple";
|
||||
break;
|
||||
case "bar":
|
||||
echo "i is bar";
|
||||
break;
|
||||
case "cake":
|
||||
echo "i is cake";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
|
Loading…
Reference in a new issue