foreach help in search

From: Date: Sun, 10 Aug 2003 17:57:14 +0000
Subject: foreach help in search
Groups: php.general 
Request: Send a blank email to php-general+get-159043@lists.php.net to get a copy of this message
Hi, I have a search page that is working perfectly so far and i have paginated it, the problem is the "next" page is giving me a slight problem. I am sending around 30 parameters via a $_GET and the "next" page must get the same parameters with the $page+1...instead of doing it manually I have tried using a foreach loop but I guess i am doing something wrong as i still dont understand them very well, my requirment is pretty simple get all the $_GET variables and their values into another variable or array and +1 the $page variable(I am getting a $_GET['page'] which is an int) Looking at the manuals examples I have experimented with this example "foreach (array_expression as $key => $value) statement" using this: foreach ($_GET as $a => $v) { print "Current value of \$a: $v.\n"; } (Chapter 11. Control Structures) but no success. Kindly help. Thanks, -Ryan We will slaughter you all! - The Iraqi (Dis)information ministers site http://MrSahaf.com

« previous php.general (#159043) next »