On Tuesday, November 12, 2002, at 07:34 PM, Ernest E Vogelsinger wrote:

Sure it is - just name the listbox control "myvar[]" (note the angle
brackets). PHP will recognize this being an array, and you'll end up with
$myvar = array('select1','select2');
Is this the only way to do this?

I just had to do some work with JavaScript and forms and the "myvar[]" name clobbered JavaScript's access to form elements by name. I had to do some ugly form.elements[x] looping to get at the "myvar[]" control.

This kind on external language hostility is not that cool, especially toward such a common language as JavaScript.

My apologies to PHP if the language provides a workaround :)


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to