i want to setup image but got error in line 8
<?php
$url = "https://dog.ceo/api/breeds/image/random";
$json = file_get_content($url);
$obj = json_decode($json, TRUE);
foreach($obj as $key) if
(
echo <img src='$key['message']'/>
else
echo <img src='not_found.png'/>
);
?>
what's the solution?