[TYPO3-core] RFC: alphabetically sorted TS tree in TS Object Browser

Dmitry Dulepov dmitry at typo3.org
Tue Dec 12 12:21:32 CET 2006


Ingmar Schlecht wrote:
> Franz Holzinger wrote:
>> change the order these 2 lines.
>> I do not know if the ksort could touch the order of the array items for
>> the next loop. 
>> ksort($arr);
>> reset($arr);
> Good point, will do before committing.

No need. ksort() will reset automatically because it changes content of 
the array, so current pointers makes no sense after ksort(). Try this 
code from command line to confirm:
	$a = array(
		1 => 'a',
		5 => 'b',
		10 => 'c',

	echo key($a);

	echo "\n\n";

	echo key($a);
It will output second key in the first "echo" and first key at second 

Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)

More information about the TYPO3-team-core mailing list