Hi April,
I suggest you code your array into one string (it depends to the size)
then decode it at the other end using your own code. It's the easiest
trick to pass the array, compress it into one variable, then extract it at
the other end.
Any other ideas? ;-)
Ahmad
----- Original Message -----
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) {
global $database_mysql;
mysql_select_db($database_mysql);
while (list ($key, $val) = each ($email)) {
echo "$key => $val<br>";
}
}
######### This will display fine. #########
while (list ($key, $val) = each ($email)) {
echo "$key => $val<br>";
}
######### Doing the same thing with the function here returns this error,
though. ########
// Warning: Variable passed to each() is not an array or object in lib.inc
on line 447
process_members($asker_rank, $total_members, $email);
--
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 administrators, e-mail: [EMAIL PROTECTED]