How can the array in the PHP script be modified to incorporate a third level of navigation?

To incorporate a third level of navigation in the PHP script, we can modify the array structure to include sub-arrays within the existing sub-arrays. Each sub-array can contain an 'url' key and a 'title' key for the third level of navigation.

$navigation = array(
    array(
        'url' => 'home.php',
        'title' => 'Home',
        'submenu' => array(
            array(
                'url' => 'about.php',
                'title' => 'About Us',
                'submenu' => array(
                    array(
                        'url' => 'team.php',
                        'title' => 'Our Team'
                    ),
                    array(
                        'url' => 'mission.php',
                        'title' => 'Our Mission'
                    )
                )
            ),
            array(
                'url' => 'services.php',
                'title' => 'Services'
            )
        )
    ),
    array(
        'url' => 'portfolio.php',
        'title' => 'Portfolio'
    ),
    array(
        'url' => 'contact.php',
        'title' => 'Contact'
    )
);