Here getting always link in this conditional

<td><?php echo (h($listing->url)!="") ? "<a href='".h($listing->url)."'>www</a>" : "" ; ?></td>

here getting always www
In case No url i get www link of current page url eg <a href="http://myUrl.com/listings">www</a>

how not get www link in case in db table url field nothing or one space…?

<?php $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";  ?>
....................................
<td><?php echo ((h($listing->url)!="" && h($listing->url) != $actual_link ) ? ("<a href='".h($listing->url)."'>www</a>") : "") ; ?></td>

this always getting TRUE any idea why…? please note exist www hyperlinks that have $actual_link as link so i want hide www but shown …
problem here
h($listing->url) != $actual_link )
always TRUE but exist equal links in case empty links (=No link exist in db)
WHY ANY HINT…?