PHP 8.3.22 Released!

Voting

: one minus one?
(Example: nine)

The Note You're Voting On

klaas at group94 dot com
23 years ago
THE DOT DOT DOT ISSUE

PROBLEM:
You want to abbreviate a string.
E.g. You want "BritneySpears" to show as "BritneySpe...", being only the ten first characters followed by "..."

SOLUTION:
<?
$oRIGINAL = "BritneySpears";
$sHORTER = substr_replace($oRIGINAL, '...', 10);
echo ($sHORTER);
?>

This will result in BritneySpe...

<< Back to user notes page

To Top