note 64545 added to function.end

From: Date: Tue, 18 Apr 2006 10:43:53 +0000
Subject: note 64545 added to function.end
Groups: php.notes 
Request: Send a blank email to php-notes+get-108392@lists.php.net to get a copy of this message
There doesn't seem to be a function that will go to the beginning of an array and return the value, so I made one. <?php /** * mixed start (array &array ) * * Move the internal pointer of an array to the beginning and return the value. **/ function start(&$array) { reset($array); return current($array); } ?> ---- Server IP: 216.194.113.175 Probable Submitter: 65.100.194.45 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.end.php Edit -- http://master.php.net/note/edit/64545 Del: integrated -- http://master.php.net/note/delete/64545/integrated Del: useless -- http://master.php.net/note/delete/64545/useless Del: bad code -- http://master.php.net/note/delete/64545/bad+code Del: spam -- http://master.php.net/note/delete/64545/spam Del: non-english -- http://master.php.net/note/delete/64545/non-english Del: in docs -- http://master.php.net/note/delete/64545/in+docs Del: other reasons-- http://master.php.net/note/delete/64545 Reject -- http://master.php.net/note/reject/64545 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#108392) next »