What PHP function could be used to read data from a file in this scenario?

To read data from a file in PHP, you can use the `file_get_contents()` function. This function reads the entire contents of a file into a string. You just need to provide the file path as a parameter to the function.

$file_path = "example.txt";
$file_contents = file_get_contents($file_path);

echo $file_contents;