Characters limitation will helps to display limited number of characters to display. [php] function limit_characters( $str, $n ) { if ( strlen ( $str ) <= $n ) { return $str; } else { return substr ( $str, 0, $n ) . ‘…’; } } [/php]
Tag: read more
Permanent link to this article: https://blog.openshell.in/2011/09/php-characters-limitation/