$data = file('file.txt');
shuffle($data);
$newdata = implode("", $data);
$fp = fopen('file.txt', 'w');
fwrite($fp, $newdata);
fclose($fp);
Make sure there is a new line at the end of the input file.
Thanks man. Worked perfectly.
+ where have you been of late?
Just busy busy busy.