Re: passing var array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux