note 94812 deleted from function.natsort by cmb

From: Date: Sun, 29 Sep 2019 12:26:09 +0000
Subject: note 94812 deleted from function.natsort by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212433@lists.php.net to get a copy of this message
Note Submitter: Christoph ---- Note: The natsort function will sort depending on the operating system, but not depending on either Linux or Windows-based systems There's a difference when sorting an array which is generated from the filesystem: Array( [0] => ./system/kernel/js/01_ui.core.js [1] => ./system/kernel/js/00_jquery-1.3.2.js [2] => ./system/kernel/js/02_my.desktop.js ) natsort($array) will result in two different ways: Case 1: (Debian) Array( [1] => ./system/kernel/js/00_jquery-1.3.2.js [0] => ./system/kernel/js/01_ui.core.js [2] => ./system/kernel/js/02_my.desktop.js ) Case 2: (Debian Kernel, but Ubuntu shadowed php-Version) Array( [0] => ./system/kernel/js/01_ui.core.js [2] => ./system/kernel/js/02_my.desktop.js [1] => ./system/kernel/js/00_jquery-1.3.2.js ) ...so make sure you've named the files beginning with 01, then it works fine.

« previous php.notes (#212433) next »