One possible rweason can be
your webserver does not allow php_short_tag (setting in php.ini)
which means short tag <? will not work
This is the reason we ALWAYS should use full <?php in our scripts.
Not sure it is your issue
but try
<a href="{$article.link}?tid=<?php echo $_GET['kw']; ?>">