using screen

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@144820 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2003-11-24 13:31:10 +00:00
parent 4c162d5be8
commit c1a36e3b89

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.http-build-query">
<refnamediv>
<refname>http_build_query</refname>
@ -81,19 +81,29 @@ $data = array('user'=>array('name'=>'Bob Smith',
'CEO');
echo http_build_query($data, 'flags_');
/* Outputs: (word wrapped for readability)
user[name]=Bob+Smith&user[age]=47&user[sex]=M&user[dob]=5%1F12%1F1956&
pastimes[0]=golf&pastimes[1]=opera&pastimes[2]=poker&pastimes[3]=rap&
children[bobby][age]=12&children[bobby][sex]=M&children[sally][age]=8&
children[sally][sex]=F&flags_0=CEO
Note: Only the numericly indexed element in the base array "CEO"
received a prefix. The other numeric indices, found under
pastimes, do not require a string prefix to be legal variable names.
*/
?>
]]>
</programlisting>
<para>
this will output : (word wrapped for readability)
</para>
<screen>
<![CDATA[
user[name]=Bob+Smith&user[age]=47&user[sex]=M&user[dob]=5%1F12%1F1956&
pastimes[0]=golf&pastimes[1]=opera&pastimes[2]=poker&pastimes[3]=rap&
children[bobby][age]=12&children[bobby][sex]=M&children[sally][age]=8&
children[sally][sex]=F&flags_0=CEO
]]>
</screen>
<para>
<note>
<para>
Only the numericly indexed element in the base array "CEO" received a
prefix. The other numeric indices, found under pastimes, do not
require a string prefix to be legal variable names.
</para>
</note>
</para>
</example>
<example>