Re: problem with code (almost fixed)
| From: | Tularis | Date: | Tue, 19 Nov 2002 10:44:36 +0000 |
| Subject: | Re: problem with code (almost fixed) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125056@lists.php.net to get a copy of this message | ||
Yan Grossman wrote:
Hi, I fixed my code to handle forms using $_REQUEST. Just having problem with the fields with multiple contents... the one you have to call like field[0], field[1],etc... How do I use the brackets inside brackets? my case is this: Thanks. I have fixed everything with $_REQUEST but I am having problem with the multiple fields, like this: $message .= ("hotel = " . $_REQUEST['pac_hot[0]'] . " - ". $_REQUEST['pac_hot[1]']. " - " .$_REQUEST['pac_hot[2]'] . " - ".$_REQUEST['pac_hot[3]'] . "\n"); How am I going to use the brackets inside the brackets? Thanks first, change this: $_REQUEST['pac_hot[0]'] to: $_REQUEST["$pac_hot[0]"]a single quote ( ' ) disallows variable-matching, meaning it won't replace $var by what it should be, it just leaves it as it where a real character it should show. that should work on all your request array stuff.... hope this helps :)