rasmus          Sat Mar 18 23:35:30 2006 UTC

  Modified files:              
    /phpdoc/en/chapters tutorial.xml 
  Log:
  Add a note on the swallowed linefeed after a closing ?>
  
  
http://cvs.php.net/viewcvs.cgi/phpdoc/en/chapters/tutorial.xml?r1=1.41&r2=1.42&diff_format=u
Index: phpdoc/en/chapters/tutorial.xml
diff -u phpdoc/en/chapters/tutorial.xml:1.41 
phpdoc/en/chapters/tutorial.xml:1.42
--- phpdoc/en/chapters/tutorial.xml:1.41        Thu Jan 12 16:16:54 2006
+++ phpdoc/en/chapters/tutorial.xml     Sat Mar 18 23:35:30 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-9"?>
-<!-- $Revision: 1.41 $ -->
+<!-- $Revision: 1.42 $ -->
  <chapter id="tutorial">
   <title>A simple tutorial</title>
 
@@ -77,7 +77,7 @@
   <title>PHP Test</title>
  </head>
  <body>
- <?php echo '<p>Hello World</p>'; ?>
+ <?php echo '<p>Hello World</p>'; ?> 
  </body>
 </html>
 ]]>
@@ -138,7 +138,23 @@
     details, read the manual section on the <link 
linkend="language.basic-syntax">
     basic PHP syntax</link>.
    </para>
-   
+  
+   <note>
+    <title>A Note on Line Feeds</title>
+    <para>
+     Line feeds have little meaning in HTML, however it is still a good idea
+     to make your HTML look nice and clean by putting line feeds in.  A
+     linefeed that follows immediately after a closing
+     <literal>?&gt;</literal> will be removed by PHP.  This can be extremely
+     useful when you are putting in many blocks of PHP or include files
+     containing PHP that aren't supposed to output anything.  At the same time
+     it can be a bit confusing.  You can put a space after the closing
+     <literal>?&gt;</literal> to force a space and a line feed to be output,
+     or you can put an explicit line feed in the last echo/print from within
+     your PHP block.
+    </para> 
+   </note> 
+
    <note>
     <title>A Note on Text Editors</title>
     <para>

Reply via email to