Home > Backend Development > PHP Tutorial > 常用字符串函数_PHP

常用字符串函数_PHP

WBOY
Release: 2016-06-01 12:32:08
Original
871 people have browsed it




常用字符串函数(三)



 //颠倒字串
 print("abcdefg  颠倒  ");
 print(strrev("abcdefg")."
");

 //小写字串
 print("小写: ".strtolower("Hello World")."


");

 //大写字串
 print("大写: ".strtoupper("Hello World")."


");

 //去空格
 $text = "     whitespace      ";
 print("\"" . trim($text) . "\"");
?>



常用字符串函数

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