Hi Vince,
Thanx for the feedback. It's appreciated.
Here is the current status on the issue. Solved! However, I am confused about something as a result of what you posted to me. I'll try to keep this short.
After posting initially, I found that not only was the range() function not working (I did do a phpinfo() by the way), but the shuffle() function as well. At that point, I shifted gears to creating a random, without duplicates, range of numbers in an array. Here is what I did. The echo comments are for testing.
.............................................
$randval;
$num[10];
$pos = 0;
$control = 10;
for( ; $pos < $control; )
{
// seed with microseconds since last "whole" second
mt_srand((double)microtime()*1000000);
// generate number
$randval = mt_rand(1, $control);
if ($pos == 0)
{
$num[0] = $randval;
++$pos;
echo $pos;
echo " ";
echo $randval; echo "<br>";
}
else if (in_array($randval, $num))
{
echo $randval; echo " is a duplicate";
echo "<br>";
}
else
{
$num[$pos] = $randval;
++$pos;
echo $pos;
echo " ";
echo $randval; echo "<br>";
}
}
echo "<br>";
echo "If this number is the same as the last in the list above, ";
echo "then the array is without a doubt created correctly. <br>";
print($num[9]);
............................................
Now I learned how to deal with arrays from C. It's my impression (and I'm still rather new at this so I could be wrong) that the length of an array needed to be know before anything could be done with it. Henceforth the line...
$num[10];
However, I gather from you're example that this is not the case. Is this a correct assumption?
Thanx for the feedback,
Big Din K.R.
www.linuxrookies.net