2
Using the phrase
"OLA SOU FIXE LALALA"
how can I only show half, for example
"OLA SOU F..."
2
Using the phrase
"OLA SOU FIXE LALALA"
how can I only show half, for example
"OLA SOU F..."
2
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) + '...');
Browser other questions tagged php javascript
You are not signed in. Login or sign up in order to post.
Here’s a more sophisticated way to do it: https://answall.com/q/155204/101
– Maniero