What are some best practices for passing parameters to a PHP file when including it?

When including a PHP file that requires parameters, it is best practice to pass those parameters as variables in the include statement. This ensures that the included file has access to the necessary data without relying on global variables or other external sources.

// main_file.php
$param1 = 'value1';
$param2 = 'value2';

include 'included_file.php';
```

```php
// included_file.php
echo $param1; // Output: value1
echo $param2; // Output: value2