Home  >  Article  >  Backend Development  >  String constant PHP reverse string function strrev function usage

String constant PHP reverse string function strrev function usage

WBOY
WBOYOriginal
2016-07-29 08:47:551285browse

Haha, it’s fun. I really want to make a function encyclopedia website, but because my energy is limited, I am busy enough just writing WEB development notes and updating one article a day, because my career is not just about writing. This blog, as well as many other websites, need to be maintained. I just write soft articles and publish original works every day. It is really tiring. Well, if I have the opportunity in the future, I will still build the Function Encyclopedia Network. I hope everyone will support it.
Definition and usage
strrev() function reverses a string.
Syntax
strrev(string)
Parameter Description
string Required. Specifies the string to reverse.
Example

Copy codeThe code is as follows:


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


Output:
!dlroW olleH
For example:

Copy the code The code is as follows:


$str="Hello world";
$result=strrev($str);
echo $result;
//The output result is: dlrow olleH;
?>

The above introduces the usage of string constants and PHP reverse string function strrev function, including the content of string constants. I hope it will be helpful to friends who are interested in PHP tutorials.

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