note 74052 added to function.http-build-query
| From: | scheols at gmail dot com | Date: | Thu, 22 Mar 2007 05:15:03 +0000 |
| Subject: | note 74052 added to function.http-build-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124697@lists.php.net to get a copy of this message | ||
Since this is only for php 5 I made my own function.
Copyrighted http://thecodingzone.com
<?php
function http_build_query4_x_x($data){
foreach($data as $porg => $porgval){
$porg = str_replace(" ","+",$porg);
$porgval = str_replace(" ","+",$porgval);
$URLEncode .= $porg."=".$porgval."&";
}
return substr($URLEncode,0,-1);
}
$test1 = array("foo" => "bar","username" =>
"TheInfernoSin","post" => "This is a test post thing");
$test2 = array("foo" => "bar","username" =>
"TheInfernoSin","post" => "This is a test post thing");
echo http_build_query4_x_x($test1,'');
echo ("<br />");
echo http_build_query4_x_x($test2,'&');
?>
----
Server IP: 216.194.113.175
Probable Submitter: 70.237.211.124
----
Manual Page -- http://www.php.net/manual/en/function.http-build-query.php
Edit -- https://master.php.net/note/edit/74052
Del: integrated -- https://master.php.net/note/delete/74052/integrated
Del: useless -- https://master.php.net/note/delete/74052/useless
Del: bad code -- https://master.php.net/note/delete/74052/bad+code
Del: spam -- https://master.php.net/note/delete/74052/spam
Del: non-english -- https://master.php.net/note/delete/74052/non-english
Del: in docs -- https://master.php.net/note/delete/74052/in+docs
Del: other reasons-- https://master.php.net/note/delete/74052
Reject -- https://master.php.net/note/reject/74052
Search -- https://master.php.net/manage/user-notes.php