mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Some cosmetic.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29743 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d7521de166
commit
d52fb97fb1
1 changed files with 25 additions and 33 deletions
|
@ -547,34 +547,32 @@ foreach($a as $k => $v) {
|
|||
|
||||
<sect1 id="control-structures.break">
|
||||
<title><literal>break</literal></title>
|
||||
|
||||
<simpara>
|
||||
<literal>break</literal> ends execution of the current
|
||||
<literal>for</literal>, <literal>while</literal>, or
|
||||
<literal>switch</literal> structure.
|
||||
</simpara>
|
||||
|
||||
<simpara>
|
||||
<literal>break</literal> accepts an optional numeric argument
|
||||
which tells it how many nested enclosing structures are to be
|
||||
broken out of.
|
||||
</simpara>
|
||||
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
$arr = array( 'one', 'two', 'three', 'four', 'stop', 'five' );
|
||||
while ( list( , $val ) = each( $arr ) ) {
|
||||
if ( $val == 'stop' ) {
|
||||
break; /* You could also write 'break 1;' here. */
|
||||
}
|
||||
echo "$val<br>\n";
|
||||
$arr = array ('one', 'two', 'three', 'four', 'stop', 'five');
|
||||
while (list (, $val) = each ($arr)) {
|
||||
if ($val == 'stop') {
|
||||
break; /* You could also write 'break 1;' here. */
|
||||
}
|
||||
echo "$val<br>\n";
|
||||
}
|
||||
|
||||
/* Using the optional argument. */
|
||||
|
||||
$i = 0;
|
||||
while ( ++$i ) {
|
||||
switch ( $i ) {
|
||||
while (++$i) {
|
||||
switch ($i) {
|
||||
case 5:
|
||||
echo "At 5<br>\n";
|
||||
break 1; /* Exit only the switch. */
|
||||
|
@ -606,10 +604,10 @@ while ( ++$i ) {
|
|||
<informalexample>
|
||||
<programlisting role="php">
|
||||
while (list ($key, $value) = each ($arr)) {
|
||||
if (!($key % 2)) { // skip odd members
|
||||
continue;
|
||||
}
|
||||
do_something_odd ($value);
|
||||
if (!($key % 2)) { // skip odd members
|
||||
continue;
|
||||
}
|
||||
do_something_odd ($value);
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
@ -618,8 +616,8 @@ while ($i++ < 5) {
|
|||
while (1) {
|
||||
echo " Middle<br>\n";
|
||||
while (1) {
|
||||
echo " Inner<br>\n";
|
||||
continue 3;
|
||||
echo " Inner<br>\n";
|
||||
continue 3;
|
||||
}
|
||||
echo "This never gets output.<br>\n";
|
||||
}
|
||||
|
@ -1057,39 +1055,33 @@ include ("file.inc"); /* $varone and $vartwo will be available in file.inc */
|
|||
<sect1 id="function.require-once">
|
||||
<title><function>require_once</function></title>
|
||||
<simpara>
|
||||
TODO
|
||||
The <function>require_once</function> statement replaces itself with
|
||||
the specified file, much like the C preprocessor's
|
||||
TODO: The <function>require_once</function> statement replaces
|
||||
itself with the specified file, much like the C preprocessor's
|
||||
<literal>#include</literal> works.
|
||||
</simpara>
|
||||
<para>
|
||||
Seel also: <function>require</function>,
|
||||
<function>include</function>, <function>include_once</function>,
|
||||
<function>get_required_files</function>,
|
||||
<function>get_included_files</function>
|
||||
<function>include</function>, <function>include_once</function>,
|
||||
<function>get_required_files</function>,
|
||||
<function>get_included_files</function>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="function.include-once">
|
||||
<title><function>include_once</function></title>
|
||||
<simpara>
|
||||
TODO
|
||||
The <function>include_once</function> statement replaces itself with
|
||||
the specified file, much like the C preprocessor's
|
||||
TODO: The <function>include_once</function> statement replaces
|
||||
itself with the specified file, much like the C preprocessor's
|
||||
<literal>#include</literal> works.
|
||||
</simpara>
|
||||
<para>
|
||||
Seel also: <function>require</function>,
|
||||
<function>include</function>, <function>require_once</function>,
|
||||
<function>get_required_files</function>,
|
||||
<function>get_included_files</function>
|
||||
<function>include</function>, <function>require_once</function>,
|
||||
<function>get_required_files</function>,
|
||||
<function>get_included_files</function>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue