{}'s example too. adding para

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@135979 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2003-07-25 22:11:41 +00:00
parent 9cef99b78d
commit 907be834ac

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.print">
<refnamediv>
@ -21,9 +21,10 @@
language construct) so you are not required to use parentheses
with its argument list.
</para>
<example>
<title><function>print</function> examples</title>
<programlisting role="php">
<para>
<example>
<title><function>print</function> examples</title>
<programlisting role="php">
<![CDATA[
<?php
print("Hello World");
@ -44,6 +45,11 @@ $bar = "barbaz";
print "foo is $foo"; // foo is foobar
// You can also use arrays
$bar = array("value" => "foo");
print "this is {$bar['value']} !"; // this is foo !
// Using single quotes will print the variable name, not the value
print 'foo is $foo'; // foo is $foo
@ -60,6 +66,7 @@ END;
]]>
</programlisting>
</example>
</para>
<simpara>
For a short discussion about the differences between
<function>print</function> and <function>echo</function>, see this FAQTs