Re: [PHP] Passing an array as an argument

2002-03-14 Thread Rasmus Lerdorf
You can't put $a[][] inside a qouted string like that. Either use ${a[][]} or put it outside like this: Print(" ".$aOptions[1][1]."\n"); -Rasmus On Thu, 14 Mar 2002, Mauricio Cuenca wrote: > Hello, > > I've built a function that receives an array as an argument to create an > HTML drop-do

[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca
Hello, I've built a function that receives an array as an argument to create an HTML drop-down list, but when I try to print the list this is all I got: Array[1] Array[1] This is my code: --- Function TextList($sName, $aOptions) { $nCount = Count($

[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca
Hello, I've built a function that receives an array as an argument to create an HTML drop-down list, but when I try to print the list this is all I got: Array[1] Array[1] This is my code: --- Function TextList($sName, $aOptions) { $nCount = Count($

Re: [PHP] Passing an array as an argument.

2001-02-07 Thread Christian Reiniger
On Tuesday 06 February 2001 18:18, April wrote: > How do you pass an array as an argument to a function? Just as any other variable. Read on... > function process_members($asker_rank, $email) { > > global $database_mysql; > mysql_select_db($database_mysql); > > while (list ($key, $val) = ea

RE: [PHP] Passing an array as an argument.

2001-02-06 Thread Ryan Gaul
()) { ... } allows you to have a default value for $email. So you can either pass it or not. -Original Message- From: April [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 06, 2001 12:18 PM To: PHP General Subject: [PHP] Passing an array as an argument. How do you pass an arr

Re: [PHP] Passing an array as an argument.

2001-02-06 Thread Web Admin
ssage - From: April To: PHP General Sent: Tuesday, February 06, 2001 8:48 PM Subject: [PHP] Passing an array as an argument. How do you pass an array as an argument to a function? My code (or at least the important parts): function process_members($asker_rank, $email) { g

[PHP] Passing an array as an argument.

2001-02-06 Thread April
How do you pass an array as an argument to a function? My code (or at least the important parts): function process_members($asker_rank, $email) { global $database_mysql; mysql_select_db($database_mysql); while (list ($key, $val) = each ($email)) { echo "$key => $val"; } } ##