Re: (Urgent!!!) Checkbox Reference
| From: | Brian Clark | Date: | Mon, 18 Dec 2000 04:13:30 +0000 |
| Subject: | Re: (Urgent!!!) Checkbox Reference | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30820@lists.php.net to get a copy of this message | ||
Hello Blake,
(BM == "Blake Miller") blakeage@hotmail.com writes:
BM> You know you can preface a variables like this:
BM>
BM> $$filename="blake";
Yes, I know that. What does that have to do with what I
posted?
BM> It has different meaning....it means the "the value of(the value of)"
BM> filename. Like nested variables...
BM>
BM> blake
BM>
BM>
BM> ----Original Message Follows----
BM> From: Brian Clark <brianj@fusionwerks.com>
BM> Reply-To: Brian Clark <brianj@fusionwerks.com>
BM> To: "PHP is not a drug ." <php-general@lists.php.net>
BM> Subject: Re: [PHP] (Urgent!!!) Checkbox Reference
BM> Date: Sun, 17 Dec 2000 01:54:33 -0500
BM>
BM>
BM> Hello Tan,
BM>
BM> (TJ == "Tan JH") jenhwi@visto.com writes:
BM>
TJ>> Can anyone tell me how to reference checkboxes which is name using
TJ>> a php variable? Thanks....
BM>
BM> Not *exactly* sure what you mean, but..
BM>
BM> <input type="checkbox" name="test" value="foo">
BM>
BM> $test holds the string 'foo'
BM>
BM> <input type="checkbox" name="test[1]" value="foo">
BM>
BM> The second element in $test holds the string 'foo'
BM>
BM> <input type="checkbox" name="test[]" value="foo">
BM> <input type="checkbox" name="test[]" value="bar">
BM>
BM> $test is comprised of two elements.
BM>
BM> while(list($key,$value) = each($test)
BM> {
BM> print "$key : $value<br>\n";
BM> }
BM>
BM>
BM> -Brian
-Brian
--
I haven't lost my mind; it's backed up on tape somewhere.