Taking an array as a function arg?
Posted: Tue Jan 14, 2003 10:42 am
Hi everyone,
I am working on writing up a simple little class to handle forms (I know there are some out there that do this but I want the experience). What I am wondering is, is there a way to accept an array as a function argument, for making checkboxes, drop downs, radios, etc... like:
function checkbox($numboxes, $listofnames, $listofvalues) {
code here
}
then call it using something like
checkbox(4, ("test1", "test2", "test3", "test4"), ("v1", "v2", "v3", "v4") );
??
Thanks for any help or insights you may have.
I am working on writing up a simple little class to handle forms (I know there are some out there that do this but I want the experience). What I am wondering is, is there a way to accept an array as a function argument, for making checkboxes, drop downs, radios, etc... like:
function checkbox($numboxes, $listofnames, $listofvalues) {
code here
}
then call it using something like
checkbox(4, ("test1", "test2", "test3", "test4"), ("v1", "v2", "v3", "v4") );
??
Thanks for any help or insights you may have.