Latest news
Home » PHP » limit the number of characters in a string php

limit the number of characters in a string php

String functions are have good role in php programming. Some times the php developer wants to limit the number of characters. In certain situations have one function. It is very useful and easy to apply
PHP Function is
Syntax: substr(string, <start position>,<end position>)
Eg: $string=’I am a web developer”;
substr($string,0,6); output: I am a

Leave a Reply

x

Check Also

How to print Codeigniter upload error

if you want to display errors on upload functionality in codeigniter. Use the following function ...