derek Sat Dec 20 22:03:57 2003 EDT
Modified files: /phpdoc/en/reference/strings/functions echo.xml Log: additional example and punctuation fix Index: phpdoc/en/reference/strings/functions/echo.xml diff -u phpdoc/en/reference/strings/functions/echo.xml:1.13 phpdoc/en/reference/strings/functions/echo.xml:1.14 --- phpdoc/en/reference/strings/functions/echo.xml:1.13 Mon Dec 15 11:53:50 2003 +++ phpdoc/en/reference/strings/functions/echo.xml Sat Dec 20 22:03:56 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --> <refentry id="function.echo"> <refnamediv> @@ -54,13 +54,17 @@ // If you are not using any other characters, you can just echo variables echo $foo; // foobar -echo $foo, $bar; // foobarbarbaz +echo $foo,$bar; // foobarbarbaz + +// Some people prefer passing multiple parameters to echo over concatenation. +echo 'This ', 'string ', 'was ', 'made ', 'with multiple parameters.', chr(10); +echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . "\n"; 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! +line with just a semicolon. no extra whitespace! END; // Because echo is not a function, following code is invalid.