Wednesday, July 29, 2009

reverse a string in php

Let's see the zend mock test question.

Question:

Which functions would be needed to translate the following string:
I love PHP 5
to the following?
5 PHP EVOL I

Answer:(choose 2)

1. mirror()
2. strtoupper()
it will convert the string to uppercase.
3. toupper()
4. str_reverse()
5. strrev()
it will reverse the string.
See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide

1 comment:

Seif said...

correct answer is strrev() !
please correct