What are some methods for loading file content into a variable in PHP without the content being output during inclusion?

When including a file in PHP using functions like `include` or `require`, the file's content is typically output immediately. To load the file content into a variable without it being output during inclusion, you can use output buffering. This allows you to capture the output of the included file and store it in a variable for further processing or manipulation.

<?php
ob_start();
include 'file.php';
$fileContent = ob_get_clean();