JURI/delVar
From Joomla! Documentation
< JURI
Removes an individual query item from the query part of the URI represented by the JURI object.
Syntax
void delVar( $name )
where:
| Argument | Data type | Description | Default |
|---|---|---|---|
| $name | string | Name of the query item to be removed. |
Example
In this example, a URI object is created and then one of the query items is removed.
$uri = 'http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis'; $u =& JURI::getInstance( $uri ); echo 'Before: ' . $u->toString() . "\n"; $u->delVar( 'task' ); echo 'After : ' . $u->toString();
would output
Before: http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis After : http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?id=32#anchorthis