How To Replace The Long Text With Dots
How To Replace The Long Text With Dots
In php we can easily replace the long text with the dots.
<body>
<?
$message="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if(strlen($message)>15)
{
$listedword=substr($message,0,15);
echo $listedword."...";
}
else
{
echo $message;
}
?>
</body>
</html>
The output is
ABCDEFGHIJKLMNO...
The first fifteen letters are printed and the remaining with dots…
http://php.net/manual/en/function.substr.php
Please visit
http://technotiger87.blogspot.com