How can PHP be used to display specific content based on different URL parameters?

To display specific content based on different URL parameters in PHP, you can use the $_GET superglobal array to retrieve the parameters from the URL and then use conditional statements to determine which content to display based on the parameter values.

<?php
// Retrieve the URL parameter
$param = $_GET['param'];

// Use conditional statements to display specific content based on the parameter
if ($param == 'option1') {
    echo "Content for option 1";
} elseif ($param == 'option2') {
    echo "Content for option 2";
} else {
    echo "Default content";
}
?>