When I take out the HTML code below the <?php ?>
the webpage does not load anymore. Why is there a dependency on that code below? I am sorry for the specificity of this question, but it is really frustrating me and I cannot seem to independently find an answer.
<?php
/*Write a function to return an HTML <img /> tag. The function should accept a
mandatory argument of the image URL and optional arguments for alt text,
height , and width
*/
function html_img ($img_url = "\"https://img.purch.com/h/1400/aHR0cDovL3d3dy5saXZlc2NpZW5jZS5jb20vaW1hZ2VzL2kvMDAwLzA5OS8zMjkvb3JpZ2luYWwvY2hpbXBzLWVhdC1tb25rZXktYnJhaW5zLTAx\"", $alt_text = "\"ronald\"", $height = 400, $width = 1200){
$the_format = "<img src=" . $img_url . "alt=" . $alt_text . " height" . $height . " width=" . $width;
return $the_format;
}
print html_img();
?>
<!--When the code below is removed, the image is not displayed.-->
<!-- <img src="https://img.purch.com/h/1400/aHR0cDovL3d3dy5saXZlc2NpZW5jZS5jb20vaW1hZ2VzL2kvMDAwLzA5OS8zMjkvb3JpZ2luYWwvY2hpbXBzLWVhdC1tb25rZXktYnJhaW5zLTAx" -->