I have a line code:
array('<a href=\'search.php?keyword="'.$k['words'].'"\'>'.$k['words'].'</a>' => 'left');
If k['words'] = "a word's"; it will error:
<a href="search.php?keyword="a word" s"'="">a word's</a>
</div>
escaping is key. urlencode for urls, htmlspecialchars for everything else.
array('<a href="search.php?keyword='.
urlencode($k['words']).'">'.
htmlspecialchars($k['words']).'</a>' => 'left');