What is the potential issue with the include statement in a switch statement in PHP?

The potential issue with the include statement in a switch statement in PHP is that the included file may be included multiple times if the switch case is executed more than once. This can lead to errors or unexpected behavior in your code. To solve this issue, you can use the require_once statement instead of include to ensure that the file is only included once.

switch ($variable) {
    case 'case1':
        require_once 'file1.php';
        break;
    case 'case2':
        require_once 'file2.php';
        break;
    default:
        require_once 'default.php';
        break;
}