Home  >  Article  >  php教程  >  PHP反转字符串函数strrev()函数的用法_php基础

PHP反转字符串函数strrev()函数的用法_php基础

WBOY
WBOYOriginal
2016-05-17 09:00:281037browse

呵呵,好玩吧,一真的想做一个函数百科网,只是由于我的精力有限了,只写WEB开发笔记,一天一篇文章的更新就已经够忙了,因为,我的职业也不只是写这一个博客,还有其它很多网站需要维护,天天就是写软文,发原创,真够累的,好了,以后有机会,我还是要把函数百科网做起来,希望大家支持。

定义和用法
strrev() 函数反转字符串。

语法
strrev(string)
参数 描述
string 必需。规定要反转的字符串。
例子

复制代码 代码如下:

echo strrev("Hello World!");
?>

输出:
!dlroW olleH

例如:
复制代码 代码如下:

$str="Hello world";
$result=strrev($str);
echo $result;
//输出的结果是:dlrow olleH;
?>
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