you can always return an array of arrays ... return array($array1, $array2, ...);
but in your case why not make the column names the array keys so the one array holds both column names and types. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] ----- Original Message ----- From: Lisi <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 12, 2002 9:34 AM Subject: [PHP] Returning multiple values from function > Is it possible to return multiple values from a function? > > I have a function that queries a MySQL database for column names (SHOW > COLUMNS) and then I go through the values return and create two arrays - > one containing column names and one containing column types. > > Is it possible to return two arrays, or do I have to combine them somehow > and then separate afterwards? Is there another way to do this? > > The code works fine when used regularly but I need to put it into a > function so I can reuse it in more than one page. > > Thanks, > > -Lisi > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php