What are the common errors or pitfalls when implementing PHP code to open a new page with image and URL content?

One common error when implementing PHP code to open a new page with image and URL content is not properly echoing out the HTML code. To solve this, make sure to concatenate the PHP variables containing the image and URL within the echo statement to output the correct HTML.

<?php
$image = "image.jpg";
$url = "https://www.example.com";

echo "<html>";
echo "<body>";
echo "<a href='$url'><img src='$image'></a>";
echo "</body>";
echo "</html>";
?>