This simple function returns a shorten string back.
function shortenString($string){
$sep = '...';
$length = 8;
echo substr_replace ($string, $sep, $length, - $length);
}
This simple function returns a shorten string back.
function shortenString($string){
$sep = '...';
$length = 8;
echo substr_replace ($string, $sep, $length, - $length);
}
Posted on 12 October 2011
Tags: function, php, returns, short string, shorten string
Copyright © 2013 KA's Blog. All rights reserved.
Proudly powered by WordPress 
Written by khawaib
Topics: PHP