Using the phrase
"OLA SOU FIXE LALALA"
How can I just show half, for example
"OLA SOU F..."
Using the phrase
"OLA SOU FIXE LALALA"
How can I just show half, for example
"OLA SOU F..."
PHP:
$string = "OLA SOU FIXE LALALA";
$metade = strlen($string)/2;
echo substr($string , 0, $metade).'...';
JS:
var string = 'OLA SOU FIXE LALALA';
var metade = string.length/2;
alert( string.substring(0, metade) + '...');