I want to be able to exclude a number from an array based on the fact the number has already been assigned.
the concept here is I am doing a random file include serveral times in one page.
I want to ensure that the same file is not included twice.
$path = "/home/folder/";
$dir_handle = @opendir($path) or die("Unable to open $path please notify the administrator. Thank you.");
while($file = readdir($dir_handle))
if($file != '.' && $file != '..' && $file !=' ' && $file !="SESSION['incl1']")
//I want to make sure when I assign the value below it is not repeated from another instance of this script embedded in the php page
$j = rand(0, $i-1);
//closing the directory