Array with $ problem
| From: | A. Gent | Date: | Fri, 13 Oct 2000 19:05:31 +0000 |
| Subject: | Array with $ problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20062@lists.php.net to get a copy of this message | ||
Hi,
Could someone help me please to tell me, what's wrong
with passing value to an array with a variable?
Example:
This works fine:
$subscription->AddInput(array(
"TYPE"=>"select",
"NAME"=>"sex",
"ValidateRegularExpression"=>"^[M | F]+$",
"SIZE"=>1,
"VALUE"=>"NULL",
"OPTIONS"=>array(
"NULL"=>"Please Select",
"M"=>"Male",
"F"=>"Female"
),
"ValidationErrorMessage"=>"Must select sex"
));
This does not:
$middle = "
\"TYPE\"=>\"select\",
\"NAME\"=>\"sex\",
\"SIZE\"=>1,
\"VALUE\"=>\"NULL\",
\"OPTIONS\"=>array(
\"NULL\"=>\"Please Select\",
\"M\"=>\"Male\",
\"F\"=>\"Female\"";
$subscription->AddInput(array(
$middle
),
"ValidationErrorMessage"=>"Must select sex"
));
Could someone tell me please, how could I feed in
$middle?
Thank you.
Art
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/