What are some methods mentioned in the thread for reading a folder in PHP?

When working with PHP, you may need to read the contents of a folder to retrieve files or directories within it. One common method to achieve this is by using the `scandir()` function in PHP, which returns an array of files and directories in a specified folder. Another approach is to use the `glob()` function, which allows for more advanced pattern matching when retrieving files. Both methods provide a simple and effective way to read the contents of a folder in PHP.

// Using scandir() function to read a folder in PHP
$folderPath = '/path/to/folder';
$files = scandir($folderPath);

foreach($files as $file) {
    echo $file . PHP_EOL;
}
```

```php
// Using glob() function to read a folder in PHP
$folderPath = '/path/to/folder';
$files = glob($folderPath . '/*');

foreach($files as $file) {
    echo $file . PHP_EOL;
}