note 127696 added to control-structures.foreach

From: Date: Thu, 06 Oct 2022 02:26:27 +0000
Subject: note 127696 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-219645@lists.php.net to get a copy of this message
For an array, foreach presents the elements of the array in the order that they were added to the array. For example, if you need to have the elements presented in ascending order by key, use the ksort function to rearrange the elements of the array in key sequence. This behavior is a result of the way that PHP arrays are stored. foreach merely presents the elements of an array in the order that they are stored within the array. ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.161 (proxied: 2604:3d09:737e:4200:65e8:3a4f:e8ed:d753) ---- Manual Page -- https://php.net/manual/en/control-structures.foreach.php Edit -- https://main.php.net/note/edit/127696 Del: integrated -- https://main.php.net/note/delete/127696/integrated Del: useless -- https://main.php.net/note/delete/127696/useless Del: bad code -- https://main.php.net/note/delete/127696/bad+code Del: spam -- https://main.php.net/note/delete/127696/spam Del: non-english -- https://main.php.net/note/delete/127696/non-english Del: in docs -- https://main.php.net/note/delete/127696/in+docs Del: other reasons-- https://main.php.net/note/delete/127696 Reject -- https://main.php.net/note/reject/127696 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219645) next »