====== setVar ======
{#JAPI Joomla.Framework Environment JURI::setVar #}
Adds a query variable and value, replacing the value if it already exists and returning the old value.
===== Syntax =====
string setVar ( **$name**, **$value** )
| **$name** | string | is a string containing the new name of the query variable to set. |
| **$value** | string | is a string containing the new Value of the query variable. |
===== Examples =====
$uri = new JURI( 'http://forum.joomla.org/index.php/topic,41464.msg227819.html?action=new' );
echo "Old Value: " . $uri->setVar( 'action', 'delete' );
$vars = $uri->getVars();
echo "New Value: " . $vars[ 'action' ];
might produce:
Old Value: new
New Value: delete