references:joomla.framework:environment:juri-setanchorsetAnchor
Sets the URI anchor string. The URI anchor is everything after the ‘#’. Syntaxvoid setAnchor ( $anchor )
ExamplesExample $uri = new JURI( 'http://www.joomla.org?action=help#create' ); echo "Before: " . $uri->toString(); $uri->setAnchor( 'delete' ); echo "After: " . $uri->toString(); might produce: Result Before: http://www.joomla.org?action=help#create After: http://www.joomla.org?action=help#delete |


