additional example and punctuation fix

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147062 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derek Ford 2003-12-21 03:03:56 +00:00
parent 9d5f08a749
commit f089b9d5cc

View file

@ -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 @@ echo 'foo is $foo'; // foo is $foo
// 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.