read and list directory function with filter option.
returns only directories which match a prefix filter.

download options for directories / read dir and list

you can download the source as PHP file,

open the file as plain text in a new window or

get the code in a textarea to copy it.