The below line of code is not working in my php page causing the page not to load. The line works fine in html and the image appropriately changes
$content[] = '<div id="dealslist" onclick="godea('.$row['id'].');" style="border-bottom:1px solid gray;padding:2px;width:180px;float:left;">
<div style="width:100%;float:left;">
<h4 style="margin:0;"><span style="float:left;">'.$row['fname'].'</span></h4><div style="width:100%;float:left;" ><p><b>Address:</b></p><span id="eventaddr" onclick="gomap();" style="color:#1D77EF;">'.$row['addr1'].', '.$row['addr2'].'<br/>'.$row['city'].', '.$row['state'].' '.$row['zip'].'</span></div><br /><p style="margin-bottom:0;">'.substr($row['description'],0,300).'</p>
</div>
</div><br /></br><a onclick="document.getElementById('myImage').src='fav2.png'"><img id="myImage" src="fav.png" style="opacity: 0.7;height:45px;max-width:100px"></a>
';
using (\'myImage\').src=\'fav2.png\' also does not work