stripping [] from a var
Hello! I have a form with a number of checkboxes (with the same name attribute). When the form is submitted I get a var in the form of: var = [checkboxvalue1, checkboxvalue2, checkboxvalue3....] I want to make a <dtml-in> loop (in a ZSQL method) using these as values. As far as I have understood, I then have to strip the [ ] from the var. How do I do this? Regards, A n d e r s G a a r s d a l H o l s t
At 07:05 PM 12/1/99 +0100, Anders Gaarsdal Holst wrote:
Hello!
I have a form with a number of checkboxes (with the same name attribute). When the form is submitted I get a var in the form of:
var = [checkboxvalue1, checkboxvalue2, checkboxvalue3....]
I want to make a <dtml-in> loop (in a ZSQL method) using these as values. As far as I have understood, I then have to strip the [ ] from the var.
Not so. Just use <dtml-in varname>. The [] that are showing just indicate the variable is a list. You can use dtml-in on a list directly, without any manipulation.
participants (2)
-
Anders Gaarsdal Holst -
Phillip J. Eby