note 97985 added to function.current

From: Date: Wed, 19 May 2010 13:37:41 +0000
Subject: note 97985 added to function.current
Groups: php.notes 
Request: Send a blank email to php-notes+get-169413@lists.php.net to get a copy of this message
current() works with functions returning an array, too. This is helpfull to get the first element of the returned array. Note that current() with functions always returns the first element, because there is no variable the array was assigned to (and therefore no pointer). Example: //get the first element of the returned array $element = current(get_my_arrays()); ---- Server IP: 212.124.37.9 Probable Submitter: 212.184.84.213 ---- Manual Page -- http://www.php.net/manual/en/function.current.php Edit -- https://master.php.net/note/edit/97985 Del: integrated -- https://master.php.net/note/delete/97985/integrated Del: useless -- https://master.php.net/note/delete/97985/useless Del: bad code -- https://master.php.net/note/delete/97985/bad+code Del: spam -- https://master.php.net/note/delete/97985/spam Del: non-english -- https://master.php.net/note/delete/97985/non-english Del: in docs -- https://master.php.net/note/delete/97985/in+docs Del: other reasons-- https://master.php.net/note/delete/97985 Reject -- https://master.php.net/note/reject/97985 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#169413) next »