The substr() function returns a part of a string.
Syntax: substr(string,start,length) where string and start is required. Length is a optional. This tutorial would help about a lot of string issue.
Example :
Syntax: substr(string,start,length) where string and start is required. Length is a optional. This tutorial would help about a lot of string issue.
Example :
<?php echo substr("Life is a beautiful", 9); //beautiful echo substr("Life is a beautiful", 3); //e is a beautiful echo substr("Life is a beautiful", -14, 2); //is ?>
No comments:
Post a Comment