Re: Array element from function return
| From: | John W. Holmes | Date: | Sun, 24 Aug 2003 15:33:46 +0000 |
| Subject: | Re: Array element from function return | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160589@lists.php.net to get a copy of this message | ||
Wouter van Vliet wrote:
I'm trying to get the first element of a value returned by a function .. == example == function return_Array() { return ('one', 'zwei', 'kolm', 'vier'); } print return_Array()[0]; ==/ example == Now i'd like this script to print 'one' for me .. can it be done without creating a temporary variable?No, use a temporary variable. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com