How to display limited characters?
Posted by
om 15 May, 2009
To display limited characters from database or from string there is a ready made function available in php it is called – substr ( string string, int start [, int length])
View Code PHP
<?php $mysite = "phpmind.com"; $string = substr($mysite, 0,7); echo $string; ?> |
Out put will be – phpmind
Categories :
Easy PHP

Comments
No comments yet.