I am trying to write a function that builds a multiple-choice drop down
list. As such, I need to specify an array in the name attribute of the
select tag. I am trying to pass a parameter to the function which gets
used as this name attribute, but seem to be having problems with the square
-Original Message-
From: Bill Hudspeth [mailto:[EMAIL PROTECTED]]
Sent: 13 August 2002 17:10
[]
DESIRED FUNCTION VERSION
$elementname=cgroup_1[];
$elementsarray=$chon_group_a;
PrintOptionBox($elementname,$elementsarray);
Well, looks ok-ish so far -- what's in the
How do you write a function that takes an array as an argument?
Could someone please point me at an example?
Regards,
Jaxon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list
On Wed, 7 Feb 2001 11:30, Jaxon wrote:
How do you write a function that takes an array as an argument?
Could someone please point me at an example?
Regards,
Jaxon
Try this:
?php
function show_elements($ary) {
while(list($key,$val) = each($ary)) {
echo "$key =
4 matches
Mail list logo