Definition of substr() function in php ?
The mainly use of The substr() function returns a component of a string.
Syntax of substr() function
substr(string,start,length)
You can see below example the use of substr() function.
<?php
//here call substr()
echo substr("Hello Jak",6);
echo substr("Hello Jak",7);
?>
output will come following:
1-when you will give length "6"
then, result will come:
"Jak"
2-when you will give length "7"
then, result will come:
"ak"
0 Comment(s)