Fair warning I’m very new at PHP coding
I’m trying to to write PHP code to display random pictures from a directory one at a time. I’ve found one to display all the pictures at once, but not just one at a time
?php
$dir = ‘Pictures/’;
opendir($dir);
//open dir
if ($opendir = opendir($dir))
{
//read dir
while (($file = readdir($opendir)) !==FALSE)
{
if($file!="."&&$file!="..")
echo "<img src='$dir/$file'style='width:1750px;'><br>";
}
}