You should convert special characters in the texts that come from your database, becase they may break your HTML (I guess it is what happened in the first div)
Use htmlspecialchars()
So, instead of:
<div class='result_summary'><?php echo $row['Summary'] ?></div>
it should be:
<div class='result_summary'><?php echo htmlspecialchars($row['Summary']) ?></div>
The translations performed are:
- & (ampersand) becomes
&
- " (double quote) becomes
"
when ENT_NOQUOTES is not set.
- ' (single quote) becomes
'
(or ') only when ENT_QUOTES is set.
- < (less than) becomes
<
- > (greater than) becomes
>