Hope this solves your problem 🙂
<?php
//Array with the abc's
$abc = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
//Display per page
$maxperline = 30;
//Placeholder guy
$whereami = 1;
//Kinda hard to explain with words, but yea, 4 for arrays.
//So for a 5 letter word, just add another for loop
for($a = 0; $a < sizeof($abc); $a++) {
for($b = 0; $b < sizeof($abc); $b++) {
for($c = 0; $c < sizeof($abc); $c++) {
for($d = 0; $d < sizeof($abc); $d++) {
//Keeps track of your 30 word per line thing
//If you want more or less, just change $maxperline
if($whereami >= $maxperline) {
$break = '<br>';
$whereami = 1;
} else {
$break = ' | ';
$whereami += 1;
}
//ECHO!
echo $abc[$a].$abc[$b].$abc[$c].$abc[$d].$break;
}
}
}
}
//All done, not so hard.
?>