Re[2]: [PHP] function returning array

From: Date: Mon, 08 Sep 2003 02:27:10 +0000
Subject: Re[2]: [PHP] function returning array
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-161948@lists.php.net to get a copy of this message
Hi, Monday, September 8, 2003, 12:16:47 PM, you wrote: L> Nothing. But it I run: L> function getData() { L> etc.. L> print_r ($theArray); L> return $theArray; L> } L> the data is definitely there. L> I should add that the function is within a class so it is like this: L> class excel_com { L> (all tested - it works well) L> function getData() { L> etc.. L> return $theArray; L> } L> } L> and here is an example of the call: L> $xls = new excel_com($workbook, $wks); L> $xls->Range($range, $inclHeader); L> $header=$xls->header; L> $data = $xls->getData(); L> $xls->close(); L> unset($xls); Well from what is there that should work...very strange does print_r show an empty array or nothing? is $theArray created in the getData() function or is part of the class and needs return $this->theArray -- regards, Tom

« previous php.general (#161948) next »