I'm relatively new to PHP and I was wondering if it was possible to modify the current url with a #something on the server in PHP (Or I guess another language; JavaScript perhaps)?
Thanks for your help,
abarnybox
I'm relatively new to PHP and I was wondering if it was possible to modify the current url with a #something on the server in PHP (Or I guess another language; JavaScript perhaps)?
Thanks for your help,
abarnybox
 
    
     
    
    with javascript
window.location=window.location+'#something'
with php
$query = parse_url($url, PHP_URL_QUERY);
if ($query) {
    $url .= '#something';
}
 
    
    Another easiest way to add #something with current URL
JS :
var e = "something";
     window.history.pushState(" ", "", "#" + e)
