Home > php教程 > php手册 > php strrev() 反转字符串,将字符串颠倒

php strrev() 反转字符串,将字符串颠倒

WBOY
Release: 2016-06-01 09:45:13
Original
1970 people have browsed it

定义和用法

strrev() 函数反转字符串,颠倒字符串的顺序,将字符串倒序排列.

 

语法

<code class="language-php">strrev(string)</code>
Copy after login
参数 描述
string 必需。规定要反转的字符串。

 

返回值

返回值: 返回已反转的字符串。
PHP 版本: 4+

 

实例

反转字符串 "manongjc.com":

<code class="language-php"><?php echo strrev("manongjc.com");
?></code>
Copy after login

在线运行

Related labels:
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template