PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_URL2 » Bug #8633

Add multple query strings

Details

Request #8633Add multple query strings
Submitted2006-09-04 17:20 UTC
Fromkristoffer dot paro at gmail dot com
Assigneddavidc
StatusClosed
PackageNet_URL2
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2006-09-04 17:20 UTC] kristoffer dot paro at gmail dot com

Description:
------------
A very usefull function to include would be one to add multiple query strings at once. This could be used by specifying an array as input to a function.

For example:
<?php
$query = array("foo"=>1, "bar"=>2);
$url->addQueryStrings($query);
?>

This function could get implemented like this:
<?php
function addQueryStrings($query, $preencoded = false)
{
if (is_array($query)) {
foreach ($query as $name => $value) {
$this->addQueryString($name, $value, $preencoded);
}
}
}
?>