$d = opendir(“docs”);
while (($file = readdir($d)) !== false) {
if (($file != ".") && ($file != "..")){
}
}
I want to be able to display the first 5 file names.
Here is the twist, I have a next button, which I want to display the next 5 filenames
Thanks
Jean
You could use a counter variable, and make sure it doesn’t go to more that 5 ?
A bit like that :
Not tested : maybe you’ll have to use
<=instead of<