Click to See Complete Forum and Search --> : PHP Explicit Array As Function Arg.


Geat
02-06-2003, 03:54 AM
Probably quite a simple one. Rather than calling a function with a predefined variable:

$title = array("Mr", "Ms", "Mrs", "Sir");
combo_box("combo1", $title);

I want to pass the arguments as an explicit array, such as:

combo_box("combo1",("Mr", "Ms", "Mrs", "Sir"));

Does anyone know if this is possible?

Cheers!

jpmoriarty
02-06-2003, 04:00 AM
sorry i cant help you (dont like arrays - they scare me!), but i would suggest for PHP related gubbins you head on over to www.phpbuilder.com/board - look forward to seeing you there!

Geat
02-06-2003, 04:02 AM
Cheers bud!

Geat
02-06-2003, 04:27 AM
Okay, so it's just:

combo_box("combo1", array("Mr", "Ms", "Mrs", "Sir"));

That was easy!