Ok, I know this is prob something stupid. But that is why I am in the newb section. I have a function
function make_password()
{
$alphabet='123456789abcdefghijklmnopqrstuvwxyz';
$alen=strlen($alphabet);
$words=array();
for($i=0; $i<20; ++$i)
{ $word='';
for($j=0; $j<10; ++$j)
{ $word.=$alphabet{mt_rand(1, $alen)-1};
}
$words[]=$word;
}
return($word);
}
This is in a function page mis_fns.php it is call with require_once('mis_fns.php'); in root_fns.php. I then use require_once('root_fns.php'); at the top of every page. This is just so that my code is a bit easyer on the eyes. I have a page called test.php this is what is on it.
<?php
require_once('root_fns.php');
make_password();
print ("$word");
?>
What am i missing I get a error when i run it. Test
Like I said this is probably very simple but I am missing it. Thank you all in advance for your help.