| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Environment |
JURI |
setQueryString |
setQueryString() |
Never | Work in Progress |
Sets the query string.
void setQueryString ( $query )
| $query | string | is a string containing the new query string. It should be in the following format: foo=bar&x=y |
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