I'm trying to identify which named anchor is currently being viewed on a
page. Although the address bar of my browser shows #whatever appended to
the end of the url, I can't seem to find it in a variable.
My efforts below return no value for ANYTHING except [path]. Am I missing
something?
$url = parse_url($_SER VER['PHP_SELF']);
$scheme = ($url[scheme]);
$host = ($url[host]);
$port = ($url[port]);
$user = ($url[user]);
$pass = ($url[pass]);
$path = ($url[path]);
$anchor = ($url[fragment]);
echo $scheme." = scheme<br>";
echo $host." = host<br>";
echo $port." = port<br>";
echo $user." = user<br>";
echo $pass." = pass<br>";
echo $path." = path<br>";
echo $anchor." = anchor<br>";