* Thus wrote Ryan A ([EMAIL PROTECTED]):
> Hi,

Hello Ryan,

> $xxx=0;
> foreach ($_GET as $a => $v) {
>    print "Current value of \$a:$a and \$v $v.\n <br>";
>    $test=$a."=".$v;
>    $test1[$xxx]="".$test;
>    $xxx++;
> }
> 
> $someVar = implode( "&", $test1);
> 

I'm not sure why your looping through all the _GET vars to build
the query string when it already exists:
  $someVar  = _SERVER["QUERY_STRING"];

> but i want to not get $test1's last component ($page) into $someVar...how do
> i do that?
> 
> Or another alternative would be to delete $page and $page's value from
> $someVar

Then you can modify it like so:
  $replace_from = 'page=' . $_GET['page'];
  $replace_to   = 'page=' . ($_GET['page'] + 1);

  $someVar = str_replace($replace_from, $replace_to, $someVar);

HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to