Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #13192
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: readdir lists randomly |
| Date | 2014-03-17 12:05 +0100 |
| Message-ID | <5326D6F0.9000005@arnowelzel.de> (permalink) |
| References | <11mnh75k6r3xo$.1mbw4jguuswxw$.dlg@40tude.net> |
Am 08.03.2014 16:01, schrieb richard:
> From the php manual
>
>
> if ($handle = opendir('audio/1960')) {
> echo "Directory handle: $handle\n";
> echo "Entries:\n";
>
> /* This is the correct way to loop over the directory. */
> while (false !== ($entry = readdir($handle))) {
> echo "$entry\n";
> echo "<br>";
>
> }
>
> closedir($handle);
> }
>
> Is there a way to list the entries according to the order they are listed
> in the directory?
> such as
> 60-001
> 60-002
> 60-003
A directory does not have such "order". The sorting has to be done
afterwards.
--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
readdir lists randomly richard <noreply@example.com> - 2014-03-08 10:01 -0500
Re: readdir lists randomly Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-03-08 10:15 -0500
Re: readdir lists randomly Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-03-08 10:48 -0500
Re: readdir lists randomly richard <noreply@example.com> - 2014-03-08 11:43 -0500
Re: readdir lists randomly Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-03-08 11:58 -0500
Re: readdir lists randomly richard <noreply@example.com> - 2014-03-08 13:05 -0500
Re: readdir lists randomly Arno Welzel <usenet@arnowelzel.de> - 2014-03-17 12:05 +0100
csiph-web