cvs: phpdoc /en/functions strings.xml
| From: | jim winstead | Date: | Sat, 08 Dec 2001 19:46:08 +0000 |
| Subject: | cvs: phpdoc /en/functions strings.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969339564@lists.php.net to get a copy of this message | ||
jimw Sat Dec 8 14:46:08 2001 EDT
Modified files:
/phpdoc/en/functions strings.xml
Log:
echo: add example using here documents
Index: phpdoc/en/functions/strings.xml
diff -u phpdoc/en/functions/strings.xml:1.130 phpdoc/en/functions/strings.xml:1.131
--- phpdoc/en/functions/strings.xml:1.130 Fri Dec 7 16:27:53 2001
+++ phpdoc/en/functions/strings.xml Sat Dec 8 14:46:08 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.130 $ -->
+<!-- $Revision: 1.131 $ -->
<reference id="ref.strings">
<title>String functions</title>
<titleabbrev>Strings</titleabbrev>
@@ -557,6 +557,13 @@
// If you are not using any other characters, you can just echo variables
echo $foo; // foobar
echo $foo,$bar; // foobarbarbaz
+
+echo <<<END
+This uses the "here document" syntax to output
+multiple lines with $variable interpolation. Note
+that the here document terminator must appear on a
+line with just a semicolon no extra whitespace!
+END;
// because echo is not a function, following code is invalid.
($some_var) ? echo('true'): echo('false');