<?php
echo substr(strip_tags("welcome to this new style editor for checking php code at online"), 2, 10);
?>
substr: Return "world" from the string:
syntax: substr(string,start,length).
If the start parameter is a negative number and length is less than or equal to start, length becomes 0.
echo substr(strip_tags("welcome to this new style editor for checking php code at online"), 2, 10);
?>
substr: Return "world" from the string:
syntax: substr(string,start,length).
If the start parameter is a negative number and length is less than or equal to start, length becomes 0.
Parameter | Description |
---|---|
string | Required. Specifies the string to return a part of |
start | Required. Specifies where to start in the string
|
length | Optional. Specifies the length of the returned string.
Default is to the end of the string.
|
0 comments:
Post a Comment