Support Joomla!

references:joomla.framework:environment:juri-setquerystring

Table of Contents

setQueryString

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Environment Class JURI Method setQueryString Reference setQueryString() Never Work in Progress

Sets the query string.

Syntax

void setQueryString ( $query )

$query string is a string containing the new query string. It should be in the following format: foo=bar&x=y

Examples

Example

$uri = new JURI( 'http://forum.joomla.org/index.php/topic,41464.msg227819.html#msg227819' );
echo "Before: " . $uri->toString();
$uri->setQueryString( 'action=new&topic=2564' );
echo "After: " . $uri->toString();

might produce:

Result

Before: http://forum.joomla.org/index.php/topic,41464.msg227819.html#msg227819
After: http://forum.joomla.org/index.php/topic,41464.msg227819.html?action=new&topic=2564#msg227819
 
references/joomla.framework/environment/juri-setquerystring.txt (684 views) · Last modified: 2007/08/15 14:51