fix example and add title

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171354 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2004-10-27 01:49:33 +00:00
parent fd5a2e9ddf
commit f647fe15cd

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.108 $ -->
<!-- $Revision: 1.109 $ -->
<chapter id="language.control-structures">
<title>Control Structures</title>
@ -842,7 +842,8 @@ while ($i++ < 5) {
same thing, one using a series of <literal>if</literal> and
<literal>elseif</literal> statements, and the other using the
<literal>switch</literal> statement:
<informalexample>
<example>
<title><literal>switch</literal> structure</title>
<programlisting role="php">
<![CDATA[
<?php
@ -868,10 +869,12 @@ case 2:
?>
]]>
</programlisting>
</informalexample>
<informalexample>
</example>
<example>
<title><literal>switch</literal> structure allows usage of strings</title>
<programlisting role="php">
<![CDATA[
<?php
switch ($i) {
case "apple":
echo "i is apple";
@ -886,7 +889,7 @@ case "cake":
?>
]]>
</programlisting>
</informalexample>
</example>
</para>
<para>
It is important to understand how the <literal>switch</literal>