Welcome Guest, Not a member yet? Register   Sign In
Can CI grab URL Hash (#page anchor) like uri_segment grabs segments ???
#4

[eluser]Cro_Crx[/eluser]
Oh wait sorry. I misread. If the hash doesn't appear in the $last_segment you can use the URL held within the $_SERVER global. I'm not sure what index it is. Just use print_r() to find it. The code would look something like this:

Code:
/* Get the entire URL */
$url = $SERVER['INDEX'];
/* Get the last hash in the URL. */
$last_hash = strrpos($url, '#');

/* Now we just grab our anchor*/
$anchor = substr($url, $last_hash + 1);

Just replace 'INDEX' with whatever the real index of the URL data is.


Messages In This Thread
Can CI grab URL Hash (#page anchor) like uri_segment grabs segments ??? - by El Forum - 01-28-2010, 12:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB