<?php
$array = range(0, 99);
for ($i = 0, $count = count($array); $i < $count; $i++) {
// Get array keys
$keys = array_keys($array);
// Get a random number between 0 and count($keys) - 1
$rand = mt_rand(0, count($keys) - 1);
// Cut $rand elements off the beginning of the keys
$keys = array_slice($keys, $rand);
// Unset a random key from the remaining keys
unset($array[$keys[array_rand($keys)]]);
// Display the remaining values with gaps filled in (pretty print)
for ($j = 0; $j < $count; $j++) echo str_pad(@$array[$j], 3, ' ', STR_PAD_LEFT);
echo "\n";
}