substr() explode() function_PHP tutorial

WBOY
Release: 2016-07-20 11:02:13
Original
895 people have browsed it

substr(string,start,length): This function extracts length characters from the start position of the string string. If start is a negative number, it starts from the end of the string. If the omitted parameter length exists but is a negative number, it means that the length character from the bottom is obtained.

 $str = "abc|bck|fhq|nui";

print(explode("|",$srt)); //Output array([0]=>abc,[1]=>bck,[2]=>fhq,[3]=> ;nui)

?>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445384.htmlTechArticlesubstr(string,start,length): This function takes out the string starting from the start position of the string string length characters. If start is a negative number, it starts from the end of the string. If it can be omitted...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!