note 106144 added to function.arsort

From: Date: Thu, 13 Oct 2011 20:40:07 +0000
Subject: note 106144 added to function.arsort
Groups: php.notes 
Request: Send a blank email to php-notes+get-183866@lists.php.net to get a copy of this message
Needed to get the index of the max/highest value in an assoc array. max() only returned the value, no index, so I did this instead. reset($x); // optional. arsort($x); $key_of_max = key($x); // returns the index. ---- Server IP: 208.69.120.55 Probable Submitter: 64.197.126.226 ---- Manual Page -- http://www.php.net/manual/en/function.arsort.php Edit -- https://master.php.net/note/edit/106144 Del: integrated -- https://master.php.net/note/delete/106144/integrated Del: useless -- https://master.php.net/note/delete/106144/useless Del: bad code -- https://master.php.net/note/delete/106144/bad+code Del: spam -- https://master.php.net/note/delete/106144/spam Del: non-english -- https://master.php.net/note/delete/106144/non-english Del: in docs -- https://master.php.net/note/delete/106144/in+docs Del: other reasons-- https://master.php.net/note/delete/106144 Reject -- https://master.php.net/note/reject/106144 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183866) next »