Using the substr function I have limited a string to a certain amount of chars.
echo substr($row["refer"], 0, 50);
However I have noticed quite a few websites add a ... if it shortens the string, how can this be achieved?
echo (strlen($row['refer']) > 50) ? substr($row['refer'], 0, 50).'...' : $row['refer'] ;
Thanks for you help 🙂 I wrote a code "almost" like this but it didn't work. Thanks again