mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
{}'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:
parent
9cef99b78d
commit
907be834ac
1 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue