Is using the "switch" statement in PHP a better alternative to multiple "if-else" conditions for including different pages?

Using the "switch" statement in PHP can be a better alternative to multiple "if-else" conditions when you need to include different pages based on a specific value. It provides a more concise and readable way to handle multiple conditions compared to a long chain of "if-else" statements.

$page = $_GET['page']; // Assuming the page value is passed through the URL

switch ($page) {
    case 'home':
        include 'home.php';
        break;
    case 'about':
        include 'about.php';
        break;
    case 'contact':
        include 'contact.php';
        break;
    default:
        include '404.php'; // Page not found
}