Re: passing var array

From: Date: Mon, 26 Apr 2004 21:57:29 +0000
Subject: Re: passing var array
References: 1 2 3 4 5 6 7 8 9  Groups: php.db 
Request: Send a blank email to php-db+get-34100@lists.php.net to get a copy of this message
You can pass arrays via GET using the syntax: http://localhost/index.php?val[1]=one&val[2]=2&...val[key]=value Andy Pete M wrote:
http://localhost/index.php?val_one=one&val2=2 on index.php print_r($_GET) will show the array echo "val l=".$_GET['val_one']; echo "val 2=".$_GET['val2']; its CAse senSitivE you can also do a foreach($_GET as $k => $v) {
    echo $k."=".$v;
} Sukanto Kho wrote:
Hi, How to pass var array to other page? I use $_GET but when I echo it, it appear "array"... Thanx Sk2


« previous php.db (#34100) next »