What is the purpose of the include command in PHP and how is it commonly used?
The include command in PHP is used to include and evaluate the specified file during the execution of a script. This is commonly used to reuse code from other files, such as functions or headers, to avoid repetition and maintain a modular code structure. It allows for better organization of code and promotes code reusability.
<?php
include 'header.php'; // include header file
include 'functions.php'; // include functions file
// rest of the PHP code
?>