I need a script to limit the size of a text I get from my DB to a certain length and if it is too long it will put ... and not display the rest....
Lets call my variable to be changed $variable
I want the script to be like
$variable = "messagethatiswaytoolong";
changing script here
echo "$variable";
And the page to look like: