functions returning arrays II
| From: | Frank Loewenthal | Date: | Fri, 24 Aug 2001 15:43:41 +0000 |
| Subject: | functions returning arrays II | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-64272@lists.php.net to get a copy of this message | ||
A lot of answers about the typing error
$r[ i ] resp. $r[ $i ]
Sorry, this was only wrong in my mail. But this is not the solution.
Hi
Perhaps I am confused, but is it not possible to return arrays in PHP?
Example:
function getArray() {
$ret = array('hallo','you');
return $ret;
}
$r = getArray();
for( $i=0;$i < count($r); $i++)
echo "$r[ $i ]";
Does not work! The array shows 2 Elements, but they are emty
Hm... Where is do mistake?
Regards
Frank
--
SFI Technology Services AG
Dr. F. Loewenthal
Stettbachstrasse 10
CH-8600 Dübendorf
Switzerland
frank.loewenthal@sfi.ch
www.sfi.ch
+41/1-824 49 00
-------------------------------------------------------
--
SFI Technology Services AG
Dr. F. Loewenthal
Stettbachstrasse 10
CH-8600 Dübendorf
Switzerland
frank.loewenthal@sfi.ch
www.sfi.ch
+41/1-824 49 00
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
-------------------------------------------------------
--
SFI Technology Services AG
Dr. F. Loewenthal
Stettbachstrasse 10
CH-8600 Dübendorf
Switzerland
frank.loewenthal@sfi.ch
www.sfi.ch
+41/1-824 49 00