How can variables be properly included in a URL path within an HTML image tag in PHP?

When including variables in a URL path within an HTML image tag in PHP, you can concatenate the variable value within the image tag using the PHP concatenation operator (.) to ensure the variable is properly included in the URL path.

<?php
$imageName = "example.jpg";
$imagePath = "images/" . $imageName;
?>

<img src="<?php echo $imagePath; ?>" alt="Example Image">