You're creating a PHP script that should generate a list of all JPEG images in a specific directory. Which combination of PHP functions can achieve this?

  • opendir(), readdir(), and substr()
  • scandir(), file_get_contents(), and explode()
  • glob() and file_get_contents()
  • fopen() and fwrite()
To generate a list of JPEG images in a directory, you can use the opendir() and readdir() functions to iterate through files, and substr() to check file extensions. These functions are ideal for this task.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *