svn: /phpdoc/en/trunk/reference/misc/functions/ unpack.xml
| From: | Peter Cowburn | Date: | Tue, 15 Mar 2011 15:48:27 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/misc/functions/ unpack.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-7856@lists.php.net to get a copy of this message | ||
salathe Tue, 15 Mar 2011 15:48:27 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=309256
Log:
fixed broken unpack() examples
Changed paths:
U phpdoc/en/trunk/reference/misc/functions/unpack.xml
Modified: phpdoc/en/trunk/reference/misc/functions/unpack.xml
===================================================================
--- phpdoc/en/trunk/reference/misc/functions/unpack.xml 2011-03-15 11:47:28 UTC (rev 309255)
+++ phpdoc/en/trunk/reference/misc/functions/unpack.xml 2011-03-15 15:48:27 UTC (rev 309256)
@@ -66,8 +66,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$binarydata = "\0x04\0x00\0xa0\0x00";
-$array = unpack("cchar/nint", $binarydata);
+$binarydata = "\x04\x00\xa0\x00";
+$array = unpack("cchars/nint", $binarydata);
?>
]]>
</programlisting>
@@ -82,11 +82,12 @@
<example>
<title><function>unpack</function> example with a repeater</title>
<programlisting role="php">
- <![CDATA[
- <?php
- $array = unpack("c2chars/nint", $binarydata);
- ?>
- ]]>
+<![CDATA[
+<?php
+$binarydata = "\x04\x00\xa0\x00";
+$array = unpack("c2chars/nint", $binarydata);
+?>
+]]>
</programlisting>
<para>
The resulting array will contain the entries "chars1",