Re: function returning array
| From: | Leonie | Date: | Mon, 08 Sep 2003 02:16:47 +0000 |
| Subject: | Re: function returning array | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161946@lists.php.net to get a copy of this message | ||
Nothing. But it I run:
function getData() {
etc..
print_r ($theArray);
return $theArray;
}
the data is definitely there.
I should add that the function is within a class so it is like this:
class excel_com {
(all tested - it works well)
function getData() {
etc..
return $theArray;
}
}
and here is an example of the call:
$xls = new excel_com($workbook, $wks);
$xls->Range($range, $inclHeader);
$header=$xls->header;
$data = $xls->getData();
$xls->close();
unset($xls);
> what do you get with this:
>
> $array = getData();
> print_r($array);
>
> --
> regards,
> Tom