How to make the code below to display none if no image?
protected function DisplayPhoto($Sender) { $body = $Sender->EventArguments['Discussion']->Body; preg_match('#\<img(.+?)src=(.+?)\>#s', $body, $matches); $image = "src=" . $matches[2]; echo '<img class="ProfilePhotoSmall"' . $image . '>'; }