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

To dynamically display content based on 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 parameters.

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

// Use conditional statements to display content based on the parameter
if($param == 'value1') {
    echo "Content for value1";
} elseif($param == 'value2') {
    echo "Content for value2";
} else {
    echo "Default content";
}
?>