Posted: Fri Dec 31, 2004 3:02 am
If you want to limit:
If you want to randomize the playlist:
Code: Select all
<?php
foreach($OpenPlayList as $k => $v){
if($k<200){ //if you want to make sure the file never get over 200 lines
$v = trim($v)."\n"; //nasty whitespace and carriage return bug in file()
fwrite($handle,$v);
}
}
fclose($handle);
?>Code: Select all
<?php
foreach($OpenPlayList as $k => $v){
$k = rand(0,200); //if you want to randomize the playlist
$v = trim($v[$k])."\n"; //nasty whitespace and carriage return bug in file()
fwrite($handle,$v);
}
}
fclose($handle);
?>