What function in PHP can be used to retrieve all CSV files in a directory and store them in an array for processing?

To retrieve all CSV files in a directory and store them in an array for processing, you can use the PHP function `glob()`. This function allows you to search for files using wildcard patterns and returns an array of file names that match the pattern. You can specify the directory path and the file extension pattern to filter only CSV files.

$directory = 'path/to/directory/';
$csvFiles = glob($directory . '*.csv');