mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Add new example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@251212 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7edf6582c0
commit
75db80b3e0
1 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry xml:id="function.json-decode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>json_decode</refname>
|
||||
|
@ -89,6 +89,20 @@ array(5) {
|
|||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$json = '{"foo-bar": 12345}';
|
||||
|
||||
$obj = json_decode($json);
|
||||
print $obj->{'foo-bar'}; // 12345
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue