Ok .. this is driving me MAD!!
even this simple example will not work.
here is my function code
<?
function genrandnum(){
$number = rand(7,7);
return $number;
}
?>
then i reference the function in another script and ask to echo $number
<?
include 'function.php';
$num = genrandnum();
echo 'The Number is: ';
echo $number;
?>
All i get are errors like this one.
Notice: Undefined variable: number in c:\Inetpub\wwwroot\timeclock\testing\index.php on line 11
if i put all of the script together in one file it works fine like below.
<?
$number = rand(7,7);
echo 'The Number is: ';
echo $number;
?>
Can someone please tell me what I am doing wrong??
Thank you in advance.
chris