note 115650 added to function.list

From: Date: Mon, 01 Sep 2014 17:21:37 +0000
Subject: note 115650 added to function.list
Groups: php.notes 
Request: Send a blank email to php-notes+get-200355@lists.php.net to get a copy of this message
if we assign array's each value individual key('numeric only'), and use the array indices in list(),, then it output the reverse order of array keys-- BUT THE HIGHER KEY VALUE ("2" in this e.g below) WILL GET THE FIRST PLACE IN THE ARRAY IN RETURN, MEANS IT PUSHES THE VALUE WITH HIGHER KEY IN PLACE OF FIRST KEY VALUE, so it also gives higher key value the first priority while reversing the order of the keys and replacing the lower key value with the higher key value. $value = array( 0 => 'low', 2 => 'medium', 1 => 'higher'); list($a[2], $a[1], $a[0]) = $value; var_dump($a); //Outputs:--- array(3) { [0] => string(6) "medium" [1] => string(6) "higher" [2] => string(3) "low" } ---- Server IP: 72.52.91.14 Probable Submitter: 106.76.148.27 ---- Manual Page -- http://php.net/manual/en/function.list.php Edit -- https://master.php.net/note/edit/115650 Del: integrated -- https://master.php.net/note/delete/115650/integrated Del: useless -- https://master.php.net/note/delete/115650/useless Del: bad code -- https://master.php.net/note/delete/115650/bad+code Del: spam -- https://master.php.net/note/delete/115650/spam Del: non-english -- https://master.php.net/note/delete/115650/non-english Del: in docs -- https://master.php.net/note/delete/115650/in+docs Del: other reasons-- https://master.php.net/note/delete/115650 Reject -- https://master.php.net/note/reject/115650 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200355) next »