RE: [PHP] functions returning arrays II
The line: echo $r[ $i ]; does not need quotation marks. You should change it to: echo $r[ $i ]; I removed the quotation marks and your script ran fine on my server. If this doesn't help post more information. Robert Zwink http://www.zwink.net/daid.net -Original Message- From: Frank Loewenthal [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 11:44 AM To: [EMAIL PROTECTED] Subject: [PHP] functions returning arrays II 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 [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 --- -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] functions returning arrays II
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 [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 --- -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] functions returning arrays II ... Umpf....@!**x@#
Hi, 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. Okay this was really the mistake. Hm... it is Friday, sorry for this stupid question. Regards Frank -- SFI Technology Services AG Dr. F. Loewenthal Stettbachstrasse 10 CH-8600 Dübendorf Switzerland [EMAIL PROTECTED] www.sfi.ch +41/1-824 49 00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]