note 74052 deleted from function.http-build-query by bobby

From: Date: Thu, 22 Mar 2007 15:38:35 +0000
Subject: note 74052 deleted from function.http-build-query by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-124721@lists.php.net to get a copy of this message
Note Submitter: scheols at gmail dot com ---- 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,'&amp;'); ?>

« previous php.notes (#124721) next »