Re: [PHP] array through url?

2001-07-27 Thread Mark Maggelet

On Fri, 27 Jul 2001 14:21:41 EDT,  ([EMAIL PROTECTED]) wrote:
>Is it possible to send an array of numbers into a php file through a
>url?
>Like if I have a file that adds numbers together, could I send it
>
>www.domain.com/add.php?num=2,3,4,5
>
>$num would be an array.

on the next page just go:
$num=explode(",",$num);

either that or use serialize/unserialize.

- Mark


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] array through url?

2001-07-27 Thread Johnny Nguyen

that's the same as $num = "2,3,4,5";
$num is a string.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 11:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] array through url?


Is it possible to send an array of numbers into a php file through a url?  
Like if I have a file that adds numbers together, could I send it

www.domain.com/add.php?num=2,3,4,5

$num would be an array.

Thanks,
Pat


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] array through url?

2001-07-27 Thread Boget, Chris

> Is it possible to send an array of numbers into a php file 
> through a url?  > Like if I have a file that adds numbers together, could
I send it
> 
> www.domain.com/add.php?num=2,3,4,5
> 
> $num would be an array.
> 
> Thanks,
> Pat
> 



RE: [PHP] array through url?

2001-07-27 Thread Boget, Chris

> Is it possible to send an array of numbers into a php file 
> through a url?  
> Like if I have a file that adds numbers together, could I send it
> www.domain.com/add.php?num=2,3,4,5
> $num would be an array.

Sent that last one out prematurely... sorry...

Take a look at the serialize() and urlencode() functions.

Chris



Re: [PHP] array through url?

2001-07-27 Thread mike cullerton

on 7/27/01 12:21 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote:

> Is it possible to send an array of numbers into a php file through a url?
> Like if I have a file that adds numbers together, could I send it
> 
> www.domain.com/add.php?num=2,3,4,5
> 
> $num would be an array.

www.domain.com/add.php?num[]=2&num[]=3&num[]=4&num[]=5

 -- mike cullerton



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]