I use the following code for hyperlinks:
echo "<a href=\"http://".$row['website']."\" target=\"_blank\">".substr($row['website'],0,50).'…'."</a>";
This will short the displayed URL if to long and add a trailing …
. But I want …
only added if URL longer than declared value, in this case 50 characters.
What's the simples way to do that?