Re: function returning array
| From: | Tom Rogers | Date: | Mon, 08 Sep 2003 02:02:57 +0000 |
| Subject: | Re: function returning array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161944@lists.php.net to get a copy of this message | ||
Hi,
Monday, September 8, 2003, 11:54:10 AM, you wrote:
L> How do I get a function to return an array? This code doesn't work:
L> function getData() {
L> <function builds the array $theArray - tested ok>
L> return $theArray;
L> }
L> Any help on the syntax would be appreciated.
L> Cheers
L> Leonie
That should work
what do you get with this:
$array = getData();
print_r($array);
--
regards,
Tom