Is it possible to pass an array through a URL? For example: http://www.mydomain.com/page.php?myvar=content1,content2,content3
Then come out with:
if(is_array($_GET['myvar')) {
print_r($_GET['myvar']);
}
which would print:
[0] => content1
[1] => content2
[2] => content3
Is there a way to pass multiple values to one variable using URL encoding? Or should I just delimit the string with a pipe and split("|",$myvar); once back in PHP?
Then come out with:
if(is_array($_GET['myvar')) {
print_r($_GET['myvar']);
}
which would print:
[0] => content1
[1] => content2
[2] => content3
Is there a way to pass multiple values to one variable using URL encoding? Or should I just delimit the string with a pipe and split("|",$myvar); once back in PHP?