hi, im kinda new to PHP, i am writing a script and i want to find a file in a directory, but first i have to get all the files which are located in a directory.

for example, lets say i have a directory tree like this:

./fruits
oranges.php
grapes.php
bananas.php
apples.php

as you can see i want to be able to get all these php files from code

does anyone know how about getting and listing all the current files from a folder?

thanks