Calling count() only once, before using 'for' loop (#313)

This commit is contained in:
Omar Khalil 2018-02-25 13:34:40 +01:00 committed by Daniil Gentili
parent bfdf38b6d1
commit 08c7cf5a8c

View File

@ -1,6 +1,8 @@
<?php
$songs = glob('*raw');
for ($x = 0; $x < count($songs); $x++) {
$songs_length = count($songs);
for ($x = 0; $x < $songs_length; $x++) {
shuffle($songs);
}