Returning multiple values from function

From: Date: Thu, 12 Dec 2002 09:34:49 +0000
Subject: Returning multiple values from function
Groups: php.general 
Request: Send a blank email to php-general+get-127969@lists.php.net to get a copy of this message
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

« previous php.general (#127969) next »