note 75760 added to function.implode
| From: | TheMadBomberWhatBombsAtMidnight at osu1 dot php dot net | Date: | Thu, 14 Jun 2007 15:46:37 +0000 |
| Subject: | note 75760 added to function.implode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127481@lists.php.net to get a copy of this message | ||
in response to Brian, building a POST/GET string from an assoc array is easily done with the builtin
http_build_query...as the example from its doc page shows:
<?php
$data = array('foo'=>'bar',
'baz'=>'boom',
'cow'=>'milk',
'php'=>'hypertext processor');
echo http_build_query($data); // foo=bar&baz=boom&cow=milk&php=hypertext+processor
?>
of course, the builtin function also urlencodes the string it returns, which Brian's function
did not.
----
Server IP: 64.71.164.2
Probable Submitter: 65.106.220.162
----
Manual Page -- http://www.php.net/manual/en/function.implode.php
Edit -- https://master.php.net/note/edit/75760
Del: integrated -- https://master.php.net/note/delete/75760/integrated
Del: useless -- https://master.php.net/note/delete/75760/useless
Del: bad code -- https://master.php.net/note/delete/75760/bad+code
Del: spam -- https://master.php.net/note/delete/75760/spam
Del: non-english -- https://master.php.net/note/delete/75760/non-english
Del: in docs -- https://master.php.net/note/delete/75760/in+docs
Del: other reasons-- https://master.php.net/note/delete/75760
Reject -- https://master.php.net/note/reject/75760
Search -- https://master.php.net/manage/user-notes.php