| l Burnerheimerton 2005-12-10, 7:11 pm |
| I get a result set form DB of names($row[1]) and a ID
field($row[0]).
With this, I loop through the result set and create a
form element and radio button for each. Like:
while ($row =& $resultSet->fetchRow()) {
$ma[] =& $form->createElement
('radio','type',null,'A','A');
$ma[] =& $form->createElement
('radio','type',null,'B','B');
$ma[] =& $form->createElement
('radio','type',null,'C','C');
$form->addGroup ( $ma, 'radio'.$row[0], $row[1].' :'
);
}
The problem is that it continually uses $ma for each
different record and adds three new radios to each new
record - not good.
I need to figure out a way dynamically change the
variable name, $ma, to $ma.$row[0] or something like
that.
I tried $ma.$row[0] and it throws error:
Parse error: parse error, unexpected '['
Any ideas how to accomplish this?
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|