Need Loops for PHP Username/Pass Encryption Script
the first thing that came to my mind to make this cleaner was an array or rather several arrays.

maybe something like this:

$user = array('admin','g','homer','marge','bart','lisa','maggie','dog');
$admin = array('admin','23!bseEsF@','homeradmin','margeadmin','bartadmin','maggieadmin','dogadmin');

$password = array(8); //my syntax may be wrong here
$adminPassword = array(8); //my syntax may be wrong here

for ($x=0; $x &lt; count($user); x$++)
{
    $password[$x] = crypt($user[$x], base64_encode($user[$x]));
    $adminPass[$x] = crypt($admin[$x], base64_encode($admin[$x]));
}


And then your Echo's would look like this.

echo $user1 . ":" . $pass1 . "&lt;br/&gt;";
for ($y=0; $y &lt; count($user); $y++)
{
    echo $user[$y] . ":" . $pass[$y] . "&lt;br/&gt;";
}
for ($z=0; $z &lt; count($admin); $z++)
{
    echo $admin[$z] . ":" . $adminPass[$z] . "&lt;br/&gt;";
}


The only way that this works is if all the arrays are the same length and arrays in PHP are base 0. otherwise you have to change the for declarations a little bit.



Again I say that my Syntax may not be perfect or even well formed,  but this is much cleaner than what you have. 

Syntax not Guaranteed