How to reverse a string in PHP

The strrev() function is an built-in function in PHP which is used to reverse strings.



string – This parameter is required. It specifies the string to reverse.


echo strrev("PHP Tutorials!"); // Output: "!slairotuT PHP"

Praveen Kumar

I am a fullstack web developer with a passion for SEO, creating stunning websites, and organic marketing. I am a perfectionist.

Post navigation