mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Correcting double ;;
Removing the word curly as per Sean's comments git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@242459 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f803440602
commit
1d4e06333e
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.22 $ -->
|
||||
<!-- $Revision: 1.23 $ -->
|
||||
<!-- Purpose: xml -->
|
||||
<!-- Membership: bundled, external -->
|
||||
|
||||
|
@ -94,7 +94,7 @@ echo $xml->movie[0]->plot; // "So this language. It's like..."
|
|||
<para>
|
||||
Accessing elements within an XML document that contain characters not permitted under
|
||||
PHP's naming convention (e.g. the hyphen) can be accomplished by encapsulating the
|
||||
element name within curly braces and the apostrophe.
|
||||
element name within braces and the apostrophe.
|
||||
<example>
|
||||
<title>Getting <literal><line></literal></title>
|
||||
<programlisting role="php">
|
||||
|
@ -104,7 +104,7 @@ include 'example.php';
|
|||
|
||||
$xml = new SimpleXMLElement($xmlstr);
|
||||
|
||||
echo $xml->movie->{'great-lines'}->line;; // "PHP solves all my web problems"
|
||||
echo $xml->movie->{'great-lines'}->line; // "PHP solves all my web problems"
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue