regina          Wed Jan 10 02:54:00 2001 EDT

  Modified files:              
    /phpdoc/kr/language control-structures.xml expressions.xml 
  Log:
  
  
  
Index: phpdoc/kr/language/control-structures.xml
diff -u phpdoc/kr/language/control-structures.xml:1.2 
phpdoc/kr/language/control-structures.xml:1.3
--- phpdoc/kr/language/control-structures.xml:1.2       Tue Jan  9 16:41:17 2001
+++ phpdoc/kr/language/control-structures.xml   Wed Jan 10 02:54:00 2001
@@ -1,49 +1,48 @@
- <chapter id="control-structures">
-  <title>Control Structures</title>
-
-  <simpara>
-   Any PHP script is built out of a series of statements. A statement
-   can be an assignment, a function call, a loop, a conditional
-   statement of even a statement that does nothing (an empty
-   statement). Statements usually end with a semicolon. In addition,
-   statements can be grouped into a statement-group by encapsulating a
-   group of statements with curly braces. A statement-group is a
-   statement by itself as well. The various statement types are
-   described in this chapter.
+<chapter id="control-structures">
+       <title>제어 구조 (Control Structures)</title>
+       <simpara>
+       모든 PHP 스크립트는 일련의 구문으로 이루어 진다. 
+       하나의 구문은 대입문이 될 수도 있고, 함수 호출, 반복문, 
+조건문이 될 수도 있으며 
+       심지어는 아무 내용이 없는 빈 문장일 수도 있다. 
+       한 구문은 일반적으로 세미콜론(;)으로 끝난다. 
+       또한 여러개의 구문을 중괄호({,})를 사용하여 하나의 
+그룹으로 만들어 사용할 수도 있다. 
+       이 구문-그룹은 그 그룹의 모든 구문들이 하나의 구문인 
+것처럼 인식된다. 
+       여기서는 여러 가지 구문형태에 대해 알아본다.
   </simpara>
-
-  <sect1 id="control-structures.if">
-   <title><literal>if</literal></title>
-   <para>
+       <sect1 id="control-structures.if">
+               <title>
+                       <literal>if</literal>
+               </title>
+               <para>
     The <literal>if</literal> construct is one of the most important
     features of many languages, PHP included.  It allows for
-    conditional execution of code fragments.  PHP features an
-    <literal>if</literal> structure that is similar to that of C:
+    conditional execution of code fragments.  
+       PHP의 <literal>if</literal> 문은 C와 비슷하다.:
     <informalexample>
-     <programlisting>
+                               <programlisting>
 if (expr)
     statement
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     As described in the section about expressions, expr is evaluated
     to its truth value.  If <replaceable>expr</replaceable> evaluates
     to <literal>TRUE</literal>, PHP will execute statement, and if it
     evaluates to <literal>FALSE</literal> - it'll ignore it.
    </simpara>
-   <para>
+               <para>
     The following example would display <computeroutput>a is bigger
     than b</computeroutput> if <replaceable>$a</replaceable> is bigger
     than <replaceable>$b</replaceable>:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 if ($a > $b)
     print "a is bigger than b";
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
     Often you'd want to have more than one statement to be executed
     conditionally.  Of course, there's no need to wrap each statement
     with an <literal>if</literal> clause.  Instead, you can group
@@ -53,25 +52,26 @@
     <replaceable>$b</replaceable>, and would then assign the value of
     <replaceable>$a</replaceable> into <replaceable>$b</replaceable>:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 if ($a > $b) {
     print "a is bigger than b";
     $b = $a;
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     If statements can be nested indefinitely within other
     <literal>if</literal> statements, which provides you with complete
     flexibility for conditional execution of the various parts of your
     program.
    </simpara>
-  </sect1>
- 
-  <sect1 id="control-structures.else">
-   <title><literal>else</literal></title>
-   <para>
+       </sect1>
+       <sect1 id="control-structures.else">
+               <title>
+                       <literal>else</literal>
+               </title>
+               <para>
     Often you'd want to execute a statement if a certain condition is
     met, and a different statement if the condition is not met.  This
     is what <literal>else</literal> is for.  <literal>else</literal>
@@ -83,29 +83,29 @@
     <replaceable>$b</replaceable>, and <computeroutput>a is NOT bigger
     than b</computeroutput> otherwise:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 if ($a > $b) {
     print "a is bigger than b";
 } else {
     print "a is NOT bigger than b";
 }
      </programlisting>
-    </informalexample>
+                       </informalexample>
 
     The <literal>else</literal> statement is only executed if the
     <literal>if</literal> expression evaluated to
     <literal>FALSE</literal>, and if there were any
     <literal>elseif</literal> expressions - only if they evaluated to
-    <literal>FALSE</literal> as well (see <link
-    linkend="control-structures.elseif">elseif</link>).
+    <literal>FALSE</literal> as well (see <link 
+linkend="control-structures.elseif">elseif</link>).
 
    </para>
-  </sect1>
- 
-  <sect1 id="control-structures.elseif">
-   <title><literal>elseif</literal></title>
-   <para>
-    <literal>elseif</literal>, as its name suggests, is a combination
+       </sect1>
+       <sect1 id="control-structures.elseif">
+               <title>
+                       <literal>elseif</literal>
+               </title>
+               <para>
+                       <literal>elseif</literal>, as its name suggests, is a 
+combination
     of <literal>if</literal> and <literal>else</literal>.  Like
     <literal>else</literal>, it extends an <literal>if</literal>
     statement to execute a different statement in case the original
@@ -118,7 +118,7 @@
     b</computeroutput>, <computeroutput>a equal to b</computeroutput>
     or <computeroutput>a is smaller than b</computeroutput>:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 if ($a > $b) {
     print "a is bigger than b";
 } elseif ($a == $b) {
@@ -127,9 +127,9 @@
     print "a is smaller than b";
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     There may be several <literal>elseif</literal>s within the same
     <literal>if</literal> statement.  The first
     <literal>elseif</literal> expression (if any) that evaluates to
@@ -140,7 +140,7 @@
     behavior) but the bottom line is that both would result in exactly
     the same behavior.
    </simpara>
-   <simpara>
+               <simpara>
     The <literal>elseif</literal> statement is only executed if the
     preceding <literal>if</literal> expression and any preceding
     <literal>elseif</literal> expressions evaluated to
@@ -148,40 +148,32 @@
     <literal>elseif</literal> expression evaluated to
     <literal>TRUE</literal>.
    </simpara>
-  </sect1>
- 
-  <sect1 id="control-structures.alternative-syntax">
-   <title>Alternative syntax for control structures</title>
-   <para>
-    PHP offers an alternative syntax for some of its control
-    structures; namely, <literal>if</literal>, 
-    <literal>while</literal>, <literal>for</literal>, 
-    <literal>foreach</literal>, and <literal>switch</literal>.
-    In each case, the basic form of the alternate syntax is to change
-    the opening brace to a colon (:) and the closing brace to
-    <literal>endif;</literal>, <literal>endwhile;</literal>,
-    <literal>endfor;</literal>, <literal>endforeach;</literal>, or
-    <literal>endswitch;</literal>, respectively.
+       </sect1>
+       <sect1 id="control-structures.alternative-syntax">
+               <title>제어구조의 다른 표현 (Alternative syntax for control 
+structures)</title>
+               <para>
+       PHP는 대부분의 제어구조에 대해 기존의 방법과는 다른 
+표현 방법을 제공한다.
+       <literal>if</literal>, <literal>while</literal>, <literal>for</literal>, 
+    <literal>foreach</literal>, <literal>switch</literal>의 5개의 제어구조에 
+대해,
+       여는 중괄호({) 대신 콜론( : )을 찍고, 닫는 중괄호(}) 대신 
+각각의 제어 구조에 따라
+       <literal>endif;</literal>나, 
+<literal>endwhile;</literal>,<literal>endfor;</literal>, 
+       <literal>endforeach;</literal>, <literal>endswitch;</literal>를 적어주면 
+된다.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
  &lt;?php if ($a == 5): ?&gt;
  A is equal to 5
  &lt;?php endif; ?&gt;
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
-    In the above example, the HTML block "A = 5" is nested within an
-    <literal>if</literal> statement written in the alternative syntax.
-    The HTML block would be displayed only if $a is equal to 5.
-   </simpara>
-   <para>
-    The alternative syntax applies to <literal>else</literal> and
-    <literal>elseif</literal> as well.  The following is an
-    <literal>if</literal> structure with <literal>elseif</literal> and
-    <literal>else</literal> in the alternative format:
+                       </informalexample>
+               </para>
+               <simpara>
+       위의 예에서 "A = 5"라는 HTML 블록이 <literal>if</literal>문 안에 
+사용되고 있다. 
+       위의 HTML 블록은 $a가 5일 경우에만 표시된다.
+   </simpara>
+               <para>
+       다음과 같이 <literal>else</literal>와 <literal>elseif</literal>도 
+사용할 수 있다. :
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 if ($a == 5):
     print "a equals 5";
     print "...";
@@ -192,28 +184,27 @@
     print "a is neither 5 nor 6";
 endif;
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
-    See also <link linkend="control-structures.while">while</link>,
-    <link linkend="control-structures.for">for</link>, and <link
-    linkend="control-structures.if">if</link> for further examples.
-   </para>
-  </sect1>
-
-  <sect1 id="control-structures.while">
-   <title><literal>while</literal></title>
-   <para>
-    <literal>while</literal> loops are the simplest type of loop in
-    PHP.  They behave just like their C counterparts.  The basic form
-    of a <literal>while</literal> statement is:
+                       </informalexample>
+               </para>
+               <para>
+    각각의 제어구조에 대한 예제는 <link 
+linkend="control-structures.while">while</link>,
+    <link linkend="control-structures.for">for</link>, <link 
+linkend="control-structures.if">if</link>를 보기 바란다.
+   </para>
+       </sect1>
+       <sect1 id="control-structures.while">
+               <title>
+                       <literal>while</literal>
+               </title>
+               <para>
+       <literal>while</literal> 루프는 PHP의 가장 간단한 제어구조이다. 
+       이것은 C와 동일하게 작동한다. <literal>while</literal>의 기본 
+형태는 다음과 같다. :
     <informalexample>
-     <programlisting>
+                               <programlisting>
 while (expr) statement
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     The meaning of a <literal>while</literal> statement is simple.  It
     tells PHP to execute the nested statement(s) repeatedly, as long
     as the <literal>while</literal> expression evaluates to
@@ -226,22 +217,22 @@
     <literal>FALSE</literal> from the very beginning, the nested
     statement(s) won't even be run once.
    </simpara>
-   <para>
+               <para>
     Like with the <literal>if</literal> statement, you can group
     multiple statements within the same <literal>while</literal> loop
     by surrounding a group of statements with curly braces, or by
     using the alternate syntax:
     <informalexample>
-     <programlisting>
+                               <programlisting>
 while (expr): statement ... endwhile;
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
     The following examples are identical, and both print numbers from
     1 to 10:
     <informalexample>
-     <programlisting>
+                               <programlisting>
 /* example 1 */
 
 $i = 1;
@@ -259,16 +250,16 @@
     $i++;
 endwhile;
      </programlisting>
-    </informalexample>
-   </para>
-  </sect1>
- 
-  <sect1 id="control-structures.do.while">
-   <title><literal>do..while</literal></title>
-   <simpara>
-    <literal>do..while</literal> loops are very similar to
-    <literal>while</literal> loops, except the truth expression is
-    checked at the end of each iteration instead of in the beginning.
+                       </informalexample>
+               </para>
+       </sect1>
+       <sect1 id="control-structures.do.while">
+               <title>
+                       <literal>do..while</literal>
+               </title>
+               <simpara>
+       <literal>do..while</literal> 루프는 비교식이 앞이 아닌 맨 뒤에 
+있다는 점을 제외하면 
+       <literal>while</literal> 루프와 비슷하다. 
     The main difference from regular <literal>while</literal> loops is
     that the first iteration of a <literal>do..while</literal> loop is
     guarenteed to run (the truth expression is only checked at the end
@@ -278,33 +269,34 @@
     <literal>FALSE</literal> right from the beginning, the loop
     execution would end immediately).
    </simpara>
-   <para>
+               <para>
     There is just one syntax for <literal>do..while</literal> loops:
  
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 $i = 0;
 do {
    print $i;
 } while ($i>0);
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
      The above loop would run one time exactly, since after the first
      iteration, when truth expression is checked, it evaluates to
      <literal>FALSE</literal> ($i is not bigger than 0) and the loop
      execution ends.
    </simpara>
-   <para>
+               <para>
     Advanced C users may be familiar with a different usage of the
     <literal>do..while</literal> loop, to allow stopping execution in
     the middle of code blocks, by encapsulating them with
-    <literal>do..while</literal>(0), and using the <link
-    linkend="control-structures.break"><literal>break</literal></link>
+    <literal>do..while</literal>(0), and using the <link 
+linkend="control-structures.break">
+                               <literal>break</literal>
+                       </link>
     statement.  The following code fragment demonstrates this:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 do {
     if ($i &lt; 5) {
         print "i is not big enough";
@@ -320,59 +312,48 @@
 
 } while(0);
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     Don't worry if you don't understand this right away or at all.
     You can code scripts and even powerful scripts without using this
     `feature'.
    </simpara>
-  </sect1>
- 
-  <sect1 id="control-structures.for">
-   <title><literal>for</literal></title>
-   <para>
-    <literal>for</literal> loops are the most complex loops in PHP.
-    They behave like their C counterparts.  The syntax of a
-    <literal>for</literal> loop is:
+       </sect1>
+       <sect1 id="control-structures.for">
+               <title>
+                       <literal>for</literal>
+               </title>
+               <para>
+       <literal>for</literal> 루프는 PHP에서 가장 복잡한 루프이다. 
+       이것의 형태은 C와 매우 유사하다. <literal>for</literal> 루프의 
+문법은 다음과 같다. :
     <informalexample>
-     <programlisting>
+                               <programlisting>
 for (expr1; expr2; expr3) statement
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
-    The first expression (<replaceable>expr1</replaceable>) is
-    evaluated (executed) once unconditionally at the beginning of the
-    loop.
-   </simpara>
-   <simpara>
-    In the beginning of each iteration,
-    <replaceable>expr2</replaceable> is evaluated.  If it evaluates to
-    <literal>TRUE</literal>, the loop continues and the nested
-    statement(s) are executed.  If it evaluates to
-    <literal>FALSE</literal>, the execution of the loop ends.
-   </simpara>
-   <simpara>
-    At the end of each iteration, <replaceable>expr3</replaceable> is
-    evaluated (executed).
-   </simpara>
-   <simpara>
-    Each of the expressions can be empty.
-    <replaceable>expr2</replaceable> being empty means the loop should
-    be run indefinitely (PHP implicitly considers it as
-    <literal>TRUE</literal>, like C).  This may not be as useless as
-    you might think, since often you'd want to end the loop using a
-    conditional <link
-    linkend="control-structures.break"><literal>break</literal></link>
-    statement instead of using the <literal>for</literal> truth
-    expression.
+                       </informalexample>
+               </para>
+               <simpara>
+       첫 번째 표현식(<replaceable>expr1</replaceable>)은 루프를 시작할 
+때 무조건 한번 평가(실행)된다.
+   </simpara>
+               <simpara>
+       매 반복의 시작 때마다 <replaceable>expr2</replaceable>가 
+평가된다. 
+       만약 이것이 <literal>TRUE</literal>면 루프는 계속되고 
+statement가 실행된다. 
+       <literal>FALSE</literal>이면 루프는 종료된다.
+   </simpara>
+               <simpara>
+       매 반복이 끝날 때 <replaceable>expr3</replaceable>가 
+평가(실행)된다.
+   </simpara>
+               <simpara>
+       각 평가식은 비워둘 수 있다. <replaceable>expr2</replaceable>가 
+비어있으면 무한 루프를 뜻한다. 
+       (PHP는 C와 같이 비어있으면 TRUE로 인식한다.) 
+       이건 별로 좋은 방법이 아니지만, 종종 이렇게 사용하고 
+<link linkend="control-structures.break">
+       <literal>break</literal></link>를 사용하여 종료하는 방법도 있다. 
    </simpara>
-   <para>
-    Consider the following examples.  All of them display numbers from
-    1 to 10:
+               <para>
+       다음 예는 1에서 10까지 출력하는 예제들이다. : 
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 /* example 1 */
  
 for ($i = 1; $i &lt;= 10; $i++) {
@@ -403,86 +384,75 @@
  
 for ($i = 1; $i &lt;= 10; print $i, $i++) ;
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
-    Of course, the first example appears to be the nicest one (or
-    perhaps the fourth), but you may find that being able to use empty
-    expressions in <literal>for</literal> loops comes in handy in many
-    occasions.
-   </simpara>
-   <para>
-    PHP also supports the alternate "colon syntax" for
-    <literal>for</literal> loops.
+                       </informalexample>
+               </para>
+               <simpara>
+       물론 처음것이 가장 좋아보인다. 그러나 나머지도 
+가능하다는 것을 알아야 한다.
+   </simpara>
+               <para>
+       PHP는 <literal>for</literal> 루프에 대해서도 다음과 같은 "colon 
+syntax"를 지원한다.
     <informalexample>
-     <programlisting>
+                               <programlisting>
 for (expr1; expr2; expr3): statement; ...; endfor;
      </programlisting>
-     </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
     Other languages have a <literal>foreach</literal> statement to
     traverse an array or hash. PHP 3 has no such construct; PHP 4 does
-    (see <link
-    linkend="control-structures.foreach">foreach</link>). In PHP 3, you
+    (see <link linkend="control-structures.foreach">foreach</link>). In PHP 3, you
     can combine <link linkend="control-structures.while">while</link>
     with the <function>list</function> and <function>each</function>
     functions to achieve the same effect. See the documentation for
     these functions for an example.
    </para>
-
-  </sect1>
-  <sect1 id="control-structures.foreach">
-   <title><literal>foreach</literal></title>
-   <para>
-    PHP 4 (not PHP 3) includes a <literal>foreach</literal> construct,
-    much like perl and some other languages. This simply gives an easy 
-    way to iterate over arrays. There are two syntaxes; the second is
-    a minor but useful extension of the first:
+       </sect1>
+       <sect1 id="control-structures.foreach">
+               <title>
+                       <literal>foreach</literal>
+               </title>
+               <para>
+       PHP4(PHP3는 아니다)는 perl 등의 다른 언어가 제공하는 foreach 
+구조를 제공한다. 
+       이 구조는 배열에 있어서 반복적인 작업을 하는데 
+유용하다. 
+       이것에는 두가지 문법이 있는데, 두 번째 것은 첫 번째 
+것의 부분 확장이라고 
+       생각할 수 있으나 실제로 매우 유용하게 사용된다.
     <informalexample>
-     <programlisting>
+                               <programlisting>
 foreach(array_expression as $value) statement
 foreach(array_expression as $key => $value) statement
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
-    The first form loops over the array given by
-    <literal>array_expression</literal>. On each loop, the value of
-    the current element is assigned to <literal>$value</literal> and
-    the internal array pointer is advanced by one (so on the next
-    loop, you'll be looking at the next element).
-   </simpara>
-   <simpara>
-    The second form does the same thing, except that the current
-    element's key will be assigned to the variable
-    <literal>$key</literal> on each loop.
-   </simpara>
-   <para>
-    <note>
-     <para>
-         When <literal>foreach</literal> first starts executing, the
-      internal array pointer is automatically reset to the first element 
-      of the array. This means that you do not need to call
-      <function>reset</function> before a <literal>foreach</literal>
-      loop.
+                       </informalexample>
+               </para>
+               <simpara>
+       첫 번째 모양은 <literal>array_expression</literal> 으로 주어진 
+배열에 대해 루프를 수행한다. 
+       개개의 루프작업내에서, 배열의 원소는 
+<literal>$value</literal>에 저장되고 
+       내부 배열 포인터(internal array pointer)는 하나 전진하여 다음 
+작업시에 새로운 원소를 가져오도록 한다.
+   </simpara>
+               <simpara>
+       두 번째 모양은 첫 번째와 동일한 작업을 하지만, 
+<literal>$key</literal>에 해당 원소의 키값을 저장하게 된다.
+   </simpara>
+               <para>
+                       <note>
+                               <para>
+       <literal>foreach</literal> 문이 처음 수행될 때, 내부 배열 
+포인터(internal array pointer)는 
+       자동적으로 배열의 첫번째 원소로 설정된다. 이말의 
+의미는 여러분이 <literal>foreach</literal>문을 사용할 때 
+       <function>reset</function>을 미리 호출할 필요는 없다는 것이다.
         </para>
-       </note>
-   </para>
-   <para>
-    <note>
-        <para>
+                       </note>
+               </para>
+               <para>
+                       <note>
+                               <para>
           Also note that <literal>foreach</literal> operates on a copy of
           the specified array, not the array itself, therefore the array
           pointer is not modified like with the each construct.
         </para>
-    </note>
-   </para>
-   <para>
-    You may have noticed that the following are functionally
-    identical:
+                       </note>
+               </para>
+               <para>
+       아래의 두 개의 문장은 동일한 결과를 만든다는 것을 알 수 
+있을 것이다. :
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 reset ($arr);
 while (list(, $value) = each ($arr)) {
     echo "Value: $value&lt;br&gt;\n";
@@ -492,10 +462,10 @@
     echo "Value: $value&lt;br&gt;\n";
 }
      </programlisting>
-    </informalexample>
-    The following are also functionally identical:
+                       </informalexample>
+       다음 두 개의 문장도 기능적으로 동일하다. :
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 reset ($arr);
 while (list($key, $value) = each ($arr)) {
     echo "Key: $key; Value: $value&lt;br&gt;\n";
@@ -505,12 +475,12 @@
     echo "Key: $key; Value: $value&lt;br&gt;\n";
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
-    Some more examples to demonstrate usages:
+                       </informalexample>
+               </para>
+               <para>
+    추가적으로 몇 개의 예제를 보자. : 
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 /* foreach example 1: value only */
 
 $a = array (1, 2, 3, 17);
@@ -542,25 +512,24 @@
     print "\$a[$k] => $v.\n";
 }
      </programlisting>
-    </informalexample>
-   </para>
-  </sect1>
- 
-  <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.
+                       </informalexample>
+               </para>
+       </sect1>
+       <sect1 id="control-structures.break">
+               <title>
+                       <literal>break</literal>
+               </title>
+               <simpara>
+       <literal>break</literal>는 <literal>for</literal>나, 
+<literal>while</literal>, <literal>switch</literal>에서 빠져 나가는 
+명령이다.
    </simpara>
-   <simpara>
-    <literal>break</literal> accepts an optional numeric argument
+               <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">
+               <para>
+                       <informalexample>
+                               <programlisting role="php">
 $arr = array ('one', 'two', 'three', 'four', 'stop', 'five');
 while (list (, $val) = each ($arr)) {
     if ($val == 'stop') {
@@ -585,25 +554,26 @@
     }
 }
      </programlisting>
-    </informalexample>
-   </para>
-  </sect1>
- 
-  <sect1 id="control-structures.continue">
-   <title><literal>continue</literal></title>
-   <simpara>
-    <literal>continue</literal> is used within looping structures to
+                       </informalexample>
+               </para>
+       </sect1>
+       <sect1 id="control-structures.continue">
+               <title>
+                       <literal>continue</literal>
+               </title>
+               <simpara>
+                       <literal>continue</literal> is used within looping structures 
+to
     skip the rest of the current loop iteration and continue execution
     at the beginning of the next iteration.
    </simpara>
-   <simpara>
-    <literal>continue</literal> accepts an optional numeric argument
+               <simpara>
+                       <literal>continue</literal> accepts an optional numeric 
+argument
     which tells it how many levels of enclosing loops it should skip
     to the end of.
    </simpara>
-   <para>
-    <informalexample>
-     <programlisting role="php">
+               <para>
+                       <informalexample>
+                               <programlisting role="php">
 while (list ($key, $value) = each ($arr)) {
     if (!($key % 2)) { // skip odd members
         continue;
@@ -625,27 +595,28 @@
     echo "Neither does this.&lt;br&gt;\n";
 }
      </programlisting>
-     </informalexample>
-    </para>
-  </sect1>
- 
-  <sect1 id="control-structures.switch">
-   <title><literal>switch</literal></title>
-   <simpara>
+                       </informalexample>
+               </para>
+       </sect1>
+       <sect1 id="control-structures.switch">
+               <title>
+                       <literal>switch</literal>
+               </title>
+               <simpara>
     The <literal>switch</literal> statement is similar to a series of
     IF statements on the same expression.  In many occasions, you may
     want to compare the same variable (or expression) with many
     different values, and execute a different piece of code depending
     on which value it equals to.  This is exactly what the
     <literal>switch</literal> statement is for.
-   </simpara> 
-   <para>
+   </simpara>
+               <para>
     The following two examples are two different ways to write the
     same thing, one using a series of <literal>if</literal>
     statements, and the other using the <literal>switch</literal>
     statement:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 if ($i == 0) {
     print "i equals 0";
 }
@@ -668,9 +639,9 @@
         break;
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
     It is important to understand how the <literal>switch</literal>
     statement is executed in order to avoid mistakes.  The
     <literal>switch</literal> statement executes line by line
@@ -685,7 +656,7 @@
     statement list, PHP will go on executing the statements of the
     following case.  For example:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 switch ($i) {
     case 0:
         print "i equals 0";
@@ -695,9 +666,9 @@
         print "i equals 2";
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     Here, if $i equals to 0, PHP would execute all of the print
     statements!  If $i equals to 1, PHP would execute the last two
     print statements, and only if $i equals to 2, you'd get the
@@ -706,7 +677,7 @@
     (even though you may want to avoid supplying them on purpose under
     certain circumstances).
    </simpara>
-   <simpara>
+               <simpara>
     In a <literal>switch</literal> statement, the condition is
     evaluated only once and the result is compared to each
     <literal>case</literal> statement. In an <literal>elseif</literal>
@@ -714,11 +685,11 @@
     more complicated than a simple compare and/or is in a tight loop,
     a <literal>switch</literal> may be faster.
    </simpara>
-   <para>
+               <para>
     The statement list for a case can also be empty, which simply
     passes control into the statement list for the next case.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 switch ($i) {
     case 0:
     case 1:
@@ -729,13 +700,13 @@
         print "i is 3";
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
     A special case is the default case.  This case matches anything
     that wasn't matched by the other cases.  For example:
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 switch ($i) {
     case 0:
         print "i equals 0";
@@ -750,21 +721,20 @@
         print "i is not equal to 0, 1 or 2";
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
     The <literal>case</literal> expression may be any expression that
     evaluates to a simple type, that is, integer or floating-point
     numbers and strings.  Arrays or objects cannot be used here unless
     they are dereferenced to a simple type.
    </para>
-   <para>
+               <para>
     The alternative syntax for control structures is supported with
-    switches. For more information, see <link
-    linkend="control-structures.alternative-syntax">Alternative syntax
+    switches. For more information, see <link 
+linkend="control-structures.alternative-syntax">Alternative syntax
     for control structures</link> .
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 switch ($i):
     case 0:
         print "i equals 0";
@@ -779,36 +749,36 @@
         print "i is not equal to 0, 1 or 2";
 endswitch;
      </programlisting>
-    </informalexample>
-   </para>
-  </sect1>
-  
-  <sect1 id="function.require">
-   <title><function>require</function></title>
-   <simpara>
+                       </informalexample>
+               </para>
+       </sect1>
+       <sect1 id="function.require">
+               <title>
+                       <function>require</function>
+               </title>
+               <simpara>
     The <function>require</function> statement replaces itself with
     the specified file, much like the C preprocessor's
     <literal>#include</literal> works.
    </simpara>
-   <simpara>
+               <simpara>
     If "URL fopen wrappers" are enabled in PHP (which they are in the
     default configuration), you can specify the file to be
     <function>require</function>ed using an URL instead of a local
     pathname. See <link linkend="features.remote-files">Remote
     files</link> and <function>fopen</function> for more information.
    </simpara>
-   <simpara>
+               <simpara>
     An important note about how this works is that when a file is
     <function>include</function>ed or <function>require</function>ed,
     parsing drops out of PHP mode and into HTML mode at the beginning
     of the target file, and resumes PHP mode again at the end. For
     this reason, any code inside the target file which should be
-    executed as PHP code must be enclosed within <link
-    linkend="language.basic-syntax.phpmode">valid PHP start and end
+    executed as PHP code must be enclosed within <link 
+linkend="language.basic-syntax.phpmode">valid PHP start and end
     tags</link>.
    </simpara>
-   <simpara>
-    <function>require</function> is not actually a function in PHP;
+               <simpara>
+                       <function>require</function> is not actually a function in PHP;
     rather, it is a language construct. It is subject to some
     different rules than functions are. For instance,
     <function>require</function> is not subject to any containing
@@ -816,7 +786,7 @@
     attempting to read a return value from a
     <function>require</function> call results in a parse error.
    </simpara>
-   <simpara>
+               <simpara>
     Unlike <function>include</function>, <function>require</function>
     will <emphasis>always</emphasis> read in the target file,
     <emphasis>even if the line it's on never executes</emphasis>. If
@@ -826,24 +796,24 @@
     which the <function>require</function> occurs is not executed,
     neither will any of the code in the target file be executed.
    </simpara>
-   <simpara>
+               <simpara>
     Similarly, looping structures do not affect the behaviour of
     <function>require</function>. Although the code contained in the
     target file is still subject to the loop, the
     <function>require</function> itself happens only once.
    </simpara>
-   <para>
+               <para>
     This means that you can't put a <function>require</function>
     statement inside of a loop structure and expect it to include the
     contents of a different file on each iteration. To do that, use an
     <function>include</function> statement.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 require ('header.inc');
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     When a file is <function>require</function>ed, the code it
     contains inherits the variable scope of the line on which the
     <function>require</function> occurs. Any variables available at
@@ -853,7 +823,7 @@
     in the called file will behave as though it had been defined
     inside that function.
    </simpara>
-   <para>
+               <para>
     If the <function>require</function>ed file is called via HTTP
     using the fopen wrappers, and if the target server interprets the
     target file as PHP code, variables may be passed to the
@@ -864,7 +834,7 @@
     on the remote server and the result is then being included into
     the local script.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 /* This example assumes that someserver is configured to parse .php
  * files and not .txt files. Also, 'works' here means that the variables 
  * $varone and $vartwo are available within the require()ed file. */
@@ -884,9 +854,9 @@
 require ("file.txt");  /* Works. */
 require ("file.php");  /* Works. */
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     In PHP 3, it is possible to execute a <literal>return</literal>
     statement inside a <function>require</function>ed file, as long as
     that statement occurs in the global scope of the
@@ -895,67 +865,66 @@
     has been discontinued. If you need this functionality, see
     <function>include</function>.
    </simpara>
-   <simpara>
+               <simpara>
     See also <function>include</function>, <function>require_once</function>,
     <function>include_once</function>, <function>readfile</function>,
        and <function>virtual</function>.
    </simpara>
-  </sect1>
- 
-  <sect1 id="function.include">
-   <title><function>include</function></title>
-   <simpara>
+       </sect1>
+       <sect1 id="function.include">
+               <title>
+                       <function>include</function>
+               </title>
+               <simpara>
     The <function>include</function> statement includes and evaluates
     the specified file.
    </simpara>
-   <simpara>
+               <simpara>
     If "URL fopen wrappers" are enabled in PHP (which they are in the
     default configuration), you can specify the file to be
     <function>include</function>ed using an URL instead of a local
     pathname. See <link linkend="features.remote-files">Remote
     files</link> and <function>fopen</function> for more information.
    </simpara>
-   <simpara>
+               <simpara>
     An important note about how this works is that when a file is
     <function>include</function>ed or <function>require</function>ed,
     parsing drops out of PHP mode and into HTML mode at the beginning
     of the target file, and resumes again at the end. For this reason,
     any code inside the target file which should be executed as PHP
-    code must be enclosed within <link
-    linkend="language.basic-syntax.phpmode">valid PHP start and end
+    code must be enclosed within <link linkend="language.basic-syntax.phpmode">valid 
+PHP start and end
     tags</link>.
    </simpara>
-   <para>
+               <para>
     This happens each time the <function>include</function> statement
     is encountered, so you can use an <function>include</function>
     statement within a looping structure to include a number of
     different files.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 $files = array ('first.inc', 'second.inc', 'third.inc');
 for ($i = 0; $i &lt; count($files); $i++) {
     include $files[$i];
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <para>
-    <function>include</function> differs from
+                       </informalexample>
+               </para>
+               <para>
+                       <function>include</function> differs from
     <function>require</function> in that the include statement is
     re-evaluated each time it is encountered (and only when it is
     being executed), whereas the <function>require</function>
     statement is replaced by the required file when it is first
     encountered, whether the contents of the file will be evaluated or
-    not (for example, if it is inside an <link
-    linkend="control-structures.if">if</link> statement whose
+    not (for example, if it is inside an <link 
+linkend="control-structures.if">if</link> statement whose
     condition evaluated to false).
    </para>
-   <para>
+               <para>
     Because <function>include</function> is a special language
     construct, you must enclose it within a statement block if it is
     inside a conditional block.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 /* This is WRONG and will not work as desired. */
  
 if ($condition)
@@ -971,9 +940,9 @@
     include($other);
 }
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     In both PHP 3 and PHP 4, it is possible to execute a
     <literal>return</literal> statement inside an
     <function>include</function>ed file, in order to terminate
@@ -988,9 +957,10 @@
     the <function>include</function> call as you would a normal
     function. This generates a parse error in PHP 3.
    </simpara>
-   <example>
-    <title><function>include</function> in PHP 3 and PHP 4</title>
-    <para>
+               <example>
+                       <title>
+                               <function>include</function> in PHP 3 and PHP 4</title>
+                       <para>
      Assume the existence of the following file (named
      <filename>test.inc</filename>) in the same directory as the main
      file:
@@ -1003,8 +973,8 @@
 echo "After the return &lt;br&gt;\n";
 ?&gt;
      </programlisting>
-    </para>
-    <para>
+                       </para>
+                       <para>
      Assume that the main file (<filename>main.html</filename>)
      contains the following:
      <programlisting role="php">
@@ -1013,8 +983,8 @@
 echo "File returned: '$retval'&lt;br&gt;\n";
 ?&gt;
      </programlisting>
-    </para>
-    <para>
+                       </para>
+                       <para>
      When <filename>main.html</filename> is called in PHP 3, it will
      generate a parse error on line 2; you can't take the value of an
      <function>include</function> in PHP 3. In PHP 4, however, the
@@ -1023,8 +993,8 @@
 Before the return
 File returned: '27'
      </screen>
-    </para>
-    <para>
+                       </para>
+                       <para>
      Now, assume that <filename>main.html</filename> has been altered
      to contain the following:
      <programlisting role="php">
@@ -1033,8 +1003,8 @@
 echo "Back in main.html&lt;br&gt;\n";
 ?&gt;
      </programlisting>
-    </para>
-    <para>
+                       </para>
+                       <para>
      In PHP 4, the output will be:
      <screen>
 Before the return
@@ -1047,8 +1017,8 @@
 
 Parse error: parse error in /home/torben/public_html/phptest/main.html on line 5
      </screen>
-    </para>
-    <para>
+                       </para>
+                       <para>
      The above parse error is a result of the fact that the
      <literal>return</literal> statement is enclosed in a non-function
      block within <filename>test.inc</filename>. When the return is
@@ -1057,13 +1027,13 @@
 Before the return
 27Back in main.html
      </screen>
-    </para>
-    <para>
+                       </para>
+                       <para>
      The spurious '27' is due to the fact that PHP 3 does not support
      <literal>return</literal>ing values from files like that.
     </para>
-   </example>
-   <simpara>
+               </example>
+               <simpara>
     When a file is <function>include</function>ed, the code it
     contains inherits the variable scope of the line on which the
     <function>include</function> occurs. Any variables available at
@@ -1073,7 +1043,7 @@
     in the called file will behave as though it had been defined
     inside that function.
    </simpara>
-   <para>
+               <para>
     If the <function>include</function>ed file is called via HTTP
     using the fopen wrappers, and if the target server interprets the
     target file as PHP code, variables may be passed to the
@@ -1084,7 +1054,7 @@
     on the remote server and the result is then being included into
     the local script.
     <informalexample>
-     <programlisting role="php">
+                               <programlisting role="php">
 /* This example assumes that someserver is configured to parse .php
  * files and not .txt files. Also, 'works' here means that the variables 
  * $varone and $vartwo are available within the include()ed file. */
@@ -1104,18 +1074,19 @@
 include ("file.txt");  /* Works. */
 include ("file.php");  /* Works. */
      </programlisting>
-    </informalexample>
-   </para>
-   <simpara>
+                       </informalexample>
+               </para>
+               <simpara>
     See also <function>require</function>, <function>require_once</function>,
     <function>include_once</function>, <function>readfile</function>,
        and <function>virtual</function>.
    </simpara>
-  </sect1>
- 
-  <sect1 id="function.require-once">
-   <title><function>require_once</function></title>
-   <para>
+       </sect1>
+       <sect1 id="function.require-once">
+               <title>
+                       <function>require_once</function>
+               </title>
+               <para>
     The <function>require_once</function> statement replaces
     itself with the specified file, much like the C preprocessor's
     <literal>#include</literal> works, and in that respect is
@@ -1125,12 +1096,12 @@
        added to your script only once, and avoid clashes with variable
        values or function names that can happen.
    </para>
-   <para>
+               <para>
      For example, if you create the following 2 include files
         <literal>utils.inc</literal> and <literal>foolib.inc</literal>
-        <example>
-        <title>utils.inc</title>
-        <programlisting role="php">
+                       <example>
+                               <title>utils.inc</title>
+                               <programlisting role="php">
 &lt;?php
 define(PHPVERSION, floor(phpversion()));
 echo "GLOBALS ARE NICE\n";
@@ -1139,10 +1110,10 @@
 }
 ?&gt;
         </programlisting>
-        </example>
-        <example>
-        <title>foolib.inc</title>
-        <programlisting role="php">
+                       </example>
+                       <example>
+                               <title>foolib.inc</title>
+                               <programlisting role="php">
 &lt;?php
 require ("utils.inc");
 function showVar($var) {
@@ -1156,11 +1127,11 @@
 // bunch of other functions ...
 ?&gt;
         </programlisting>
-        </example>
+                       </example>
         And then you write a script <literal>cause_error_require.php</literal>
-        <example>
-        <title>cause_error_require.php</title>
-        <programlisting role="php">
+                       <example>
+                               <title>cause_error_require.php</title>
+                               <programlisting role="php">
 &lt;?php
 require("foolib.inc");
 /* the following will generate an error */
@@ -1173,44 +1144,44 @@
 showVar($foo);
 ?&gt;
         </programlisting>
-        </example>
+                       </example>
         When you try running the latter one, the resulting ouptut will be (using
         PHP 4.01pl2):
         <informalexample>
-        <programlisting>
+                               <programlisting>
 GLOBALS ARE NICE
 GLOBALS ARE NICE
 
 Fatal error:  Cannot redeclare goodTea() in utils.inc on line 5
         </programlisting>
-        </informalexample>
+                       </informalexample>
         By modifying <literal>foolib.inc</literal> and
         <literal>cause_errror_require.php</literal> 
         to use <function>require_once</function>
         instead of <function>require</function> and renaming the
         last one to <literal>avoid_error_require_once.php</literal>, we have:
         <example>
-        <title>foolib.inc (fixed)</title>
-        <programlisting role="php">
+                               <title>foolib.inc (fixed)</title>
+                               <programlisting role="php">
 ...
 require_once("utils.inc");
 function showVar($var) {
 ...
         </programlisting>
-        </example>
-        <example>
-        <title>avoid_error_require_once.php</title>
-        <programlisting role="php">
+                       </example>
+                       <example>
+                               <title>avoid_error_require_once.php</title>
+                               <programlisting role="php">
 ...
 require_once("foolib.inc");
 require_once("utils.inc");
 $foo = array("1",array("complex","quaternion"));
 ...
         </programlisting>
-        </example>
+                       </example>
         And when running the latter, the output will be (using PHP 4.0.1pl2):
         <informalexample>
-        <programlisting>
+                               <programlisting>
 GLOBALS ARE NICE
 this is requiring globals.inc again which is also
 required in foolib.inc
@@ -1227,9 +1198,9 @@
 
 )
         </programlisting>
-        </informalexample>
-   </para>
-   <para>
+                       </informalexample>
+               </para>
+               <para>
      Also note that, analogous to the behavior of the
         <literal>#include</literal> of the C preprocessor, this statement
         acts at "compile time", e.g. when the script is parsed and before it
@@ -1238,30 +1209,31 @@
         <function>include_once</function> or <function>include</function>
         for that purpose.
    </para>
-   <para>
+               <para>
      For more examples on using <function>require_once</function> and 
         <function>include_once</function>, look at the PEAR code included in
         the latest PHP source code distributions.
    </para>
-   <para>
+               <para>
     See also: <function>require</function>,
     <function>include</function>, <function>include_once</function>,
     <function>get_required_files</function>,
     <function>get_included_files</function>, <function>readfile</function>,
        and <function>virtual</function>.
    </para>
-  </sect1>
-  
-  <sect1 id="function.include-once">
-   <title><function>include_once</function></title>
-   <para>
+       </sect1>
+       <sect1 id="function.include-once">
+               <title>
+                       <function>include_once</function>
+               </title>
+               <para>
     The <function>include_once</function> statement includes and evaluates
     the specified file during the execution of the script.
        This is a behavior similar to the <function>include</function> statement,
        with the important difference that if the code from a file has already
        been included, it will not be included again.
    </para>
-   <para>
+               <para>
     As mentioned in the <function>require_once</function> description, the
        <function>include_once</function> should be used in the cases in which
        the same file might be included and evaluated more than once during a
@@ -1269,26 +1241,24 @@
        included exactly once to avoid problems with function redefinitions,
        variable value reassignments, etc.
    </para>
-   <para>
+               <para>
      For more examples on using <function>require_once</function> and 
         <function>include_once</function>, look at the PEAR code included in
         the latest PHP source code distributions.
    </para>
-   <para>
-     <function>include_once</function> was added in PHP 4.0.1pl2
+               <para>
+                       <function>include_once</function> was added in PHP 4.0.1pl2
    </para>
-   <para>
+               <para>
     See also: <function>require</function>,
     <function>include</function>, <function>require_once</function>,
     <function>get_required_files</function>,
     <function>get_included_files</function>, <function>readfile</function>,
        and <function>virtual</function>.
    </para>
-  </sect1>
- 
- </chapter>
- 
- <!-- Keep this comment at the end of the file
+       </sect1>
+</chapter>
+<!-- Keep this comment at the end of the file
  Local variables:
  mode: sgml
  sgml-omittag:t
Index: phpdoc/kr/language/expressions.xml
diff -u phpdoc/kr/language/expressions.xml:1.2 phpdoc/kr/language/expressions.xml:1.3
--- phpdoc/kr/language/expressions.xml:1.2      Tue Jan  9 16:41:17 2001
+++ phpdoc/kr/language/expressions.xml  Wed Jan 10 02:54:00 2001
@@ -1,38 +1,28 @@
- <chapter id="language.expressions">
-   <title>Expressions</title>
-
-   <simpara>
-    Expressions are the most important building stones of PHP.  In PHP,
-    almost anything you write is an expression.  The simplest yet
-    most accurate way to define an expression is "anything that has a
-    value".</simpara>
-
-   <simpara>
-    The most basic forms of expressions are constants and variables.
-    When you type "$a = 5", you're assigning '5' into $a.  '5', obviously,
-    has the value 5, or in other words '5' is an expression with the
-    value of 5 (in this case, '5' is an integer constant).</simpara>
-
-   <simpara>
-    After this assignment, you'd expect $a's value to be 5 as
-    well, so if you wrote $b = $a, you'd expect it to behave just as
-    if you wrote $b = 5.  In other words, $a is an expression with the
-    value of 5 as well.  If everything works right, this is exactly
-    what will happen.</simpara>
-
-   <para>
-    Slightly more complex examples for expressions are functions.  For
-    instance, consider the following function:
-
+<chapter id="language.expressions">
+       <title>표현식 (Expressions)</title>
+       <simpara>
+       표현식은 PHP에서 매우 중요한 내용이다. 
+       PHP에서 여러분이 작성하는 거의 모든 것은 표현식이다. 
+       간단히 표현식의 정의를 엄밀하게 말한다면 "값을 가지고 
+있는 모든 것"("anything that has a value")이다.
+       </simpara>
+       <simpara>
+       간단한 예제로 "$a = 5"와 같은 것이 있다. 이것은 '5'라는 
+값을 $a라는 변수에 대입하는 문장이다. 
+       여기서 '5'라는 표현식은 값 5 라는 의미가 된다. 
+       </simpara>
+       <simpara>
+       위의 문장 다음에 "$b = $a"라는 문장이 있다면, 여기서 
+$a라는 표현식은 그 변수가 가진 5라는 값을 표현한다.
+       </simpara>
+       <para>
+       조금 복잡한 경우는 함수이다. 다음 함수를 보자. : 
     <informalexample>
-     <programlisting>
+                       <programlisting>
 function foo () {
     return 5;
 }
      </programlisting>
-    </informalexample></para>
-
-   <simpara>
+               </informalexample>
+       </para>
+       <simpara>
     Assuming you're familiar with the concept of functions (if you're
     not, take a look at the chapter about functions), you'd assume
     that typing <literal>$c = foo()</literal> is essentially just like
@@ -40,8 +30,7 @@
     are expressions with the value of their return value.  Since foo()
     returns 5, the value of the expression 'foo()' is 5.  Usually
     functions don't just return a static value but compute something.</simpara>
-
-   <simpara>
+       <simpara>
     Of course, values in PHP don't have to be integers, and very often
     they aren't.  PHP supports three scalar value types: integer values,
     floating point values and string values (scalar values are values that
@@ -49,8 +38,7 @@
     PHP also supports two composite (non-scalar) types: arrays and
     objects.  Each of these value types can be assigned into variables or
     returned from functions.</simpara>
-
-   <simpara>
+       <simpara>
     So far, users of PHP/FI 2 shouldn't feel any change.  However, PHP
     takes expressions much further, in the same way many other
     languages do.  PHP is an expression-oriented language, in the
@@ -66,8 +54,7 @@
     '$b = ($a = 5)' is like writing '$a = 5; $b = 5;' (a semicolon
     marks the end of a statement).  Since assignments are parsed in a
     right to left order, you can also write '$b = $a = 5'.</simpara>
-
-   <simpara>
+       <simpara>
     Another good example of expression orientation is pre- and
     post-increment and decrement.  Users of PHP/FI 2 and many other
     languages may be familiar with the notation of variable++ and
@@ -86,8 +73,7 @@
     written '$variable++' evaluates to the original value of
     $variable, before it was incremented (PHP increments the variable
     after reading its value, thus the name 'post-increment').</simpara>
-
-   <simpara>
+       <simpara>
     A very common type of expressions are comparison expressions.
     These expressions evaluate to either 0 or 1, meaning FALSE or TRUE
     (respectively).  PHP supports &gt; (bigger than), &gt;= (bigger than
@@ -95,8 +81,7 @@
     (smaller than or equal to).  These expressions are most commonly used
     inside conditional execution, such as <literal>if</literal>
     statements.</simpara>
-
-   <simpara>
+       <simpara>
     The last example of expressions we'll deal with here is combined
     operator-assignment expressions.  You already know that if you
     want to increment $a by 1, you can simply write '$a++' or '++$a'.
@@ -117,26 +102,26 @@
     assigned into $a).  Any two-place operator can be used in this
     operator-assignment mode, for example '$a -= 5' (subtract 5 from
     the value of $a), '$b *= 7' (multiply the value of $b by 7), etc.</simpara>
-
-   <para>
+       <para>
     There is one more expression that may seem odd if you haven't seen
     it in other languages, the ternary conditional operator:
 
-    <informalexample><programlisting>
+    <informalexample>
+                       <programlisting>
 $first ? $second : $third
-</programlisting></informalexample>
+</programlisting>
+               </informalexample>
 
     If the value of the first subexpression is true (non-zero), then
     it the second subexpression is evaluated, and that is the result
     of the conditional expression. Otherwise, the third subexpression
     is evaluated, and that is the value.</para>
-
-   <para>
+       <para>
     The following example should help you understand pre- and
     post-increment and expressions in general a bit better:
 
     <informalexample>
-     <programlisting>
+                       <programlisting>
 function double($i) {
     return $i*2;
 }
@@ -156,9 +141,10 @@
                        value of 24. the value of the assignment (24) is 
                        then assigned into $h, and $h ends with the value 
                        of 24 as well. */
-</programlisting></informalexample></para>
-
-   <simpara>
+</programlisting>
+               </informalexample>
+       </para>
+       <simpara>
     In the beginning of the chapter we said that we'll be describing
     the various statement types, and as promised, expressions can be
     statements.  However, not every expression is a statement.  In
@@ -166,8 +152,7 @@
     expression followed by a semicolon.  In '$b=$a=5;', $a=5 is a
     valid expression, but it's not a statement by itself.  '$b=$a=5;'
     however is a valid statement.</simpara>
-
-   <simpara>
+       <simpara>
     One last thing worth mentioning is the truth value of expressions.
     In many events, mainly in conditional execution and loops, you're
     not interested in the specific value of the expression, but only
@@ -180,18 +165,15 @@
     With non-scalar values (arrays and objects) - if the value
     contains no elements it's considered FALSE, otherwise it's
     considered TRUE.</simpara>
-
-   <simpara>
+       <simpara>
     PHP provides a full and powerful implementation of expressions, and
     documenting it entirely goes beyond the scope of this manual. The
     above examples should give you a good idea about what expressions
     are and how you can construct useful expressions. Throughout the
     rest of this manual we'll write <replaceable>expr</replaceable>
     to indicate any valid PHP expression.</simpara>
-
-  </chapter>
- 
- <!-- Keep this comment at the end of the file
+</chapter>
+<!-- Keep this comment at the end of the file
  Local variables:
  mode: sgml
  sgml-omittag:t

Reply via email to