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

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

WBOY
WBOYOriginal
2016-06-01 09:45:131968browse

定义和用法

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

 

语法

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

 

返回值

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

 

实例

反转字符串 "manongjc.com":

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

在线运行

Statement:
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