Ok, I got it, I changed
$final = $url['0'] . $url['1'];
to
$final = $url['0'] .','. $url['1'];
and that works. Explode() seems to use the character as a divider, and removes it from the results, at least in the first case with 0 it does.
Anyways, it works, thanks!
This looks interesting, I think I'll give that a shot!
Very close! It does *almost* what I need. I cuts off everything including and after the second comma, BUT, it removes the first comma, which I need...
This is how far I've gotten. So far, $page_code would print something like "read.php?1,2,2"
$page_url = $_SERVER['HTTP_REFERER'];
$parse = parse_url($page_url);
$path = $parse['path'];
$query = $parse['query'];
$page_code = $path.$query;
I want to cut off anything including and after the second comma, how would I do that so I end up with $page_code == "read.php?1,2" ?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.