A very important question indeed :)

<form method='POST'...

<input type="text" name="interests[]">
<input type="text" name="interests[]">

 print $_POST['interests'][0];
 print $_POST['interests'][1];

<input type="text" name="interests[foo]">
<input type="text" name="interests[bar]">

 print $_POST['interests']['foo'];
 print $_POST['interests']['bar'];

Read the manual section on arrays for more
information on using them.

  http://www.php.net/manual/en/language.types.array.php

Regards,
Philip

On Wed, 30 Oct 2002, Rick Emery wrote:

> What does you HTML look like?
> ----- Original Message ----- 
> From: "John Meyer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 30, 2002 10:36 AM
> Subject: RE: [PHP] array question
> 
> 
> Either way, I'm not getting the interests.
> 
> -----Original Message-----
> From: Rick Emery [mailto:remery@;emeryloftus.com]
> Sent: Wednesday, October 30, 2002 9:34 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] array question
> 
> 
> What happened when you tried both methods?
> 
> ----- Original Message ----- 
> From: "John Meyer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 30, 2002 10:29 AM
> Subject: [PHP] array question
> 
> 
> When retrieving an array from $_POST, which is the right way:
> 
> $arrInterests = $_POST["interests[]"];
> 
> or 
> $arrInterests = $_POST["interests"];
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

Reply via email to