Thanks to the help in the comments, it seems like I solved my problem!
<?php
$items = file_get_contents("items.txt");
$items = explode("\n", $items);
shuffle($items);
$x = 1;
while ($x <= 800) {
array_shift($items);
$x++;
}
print_r($items);
?>
Like the comments stated, I loaded the file, exploded it by each new line, used shuffle()
on the items, and ran a while loop using array_shift()
to remove the random lines.