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:
Jon Wood 2004-07-23 19:29:10 +00:00
parent 4fa2821921
commit a21beaec52

View file

@ -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>