Thursday, 1 May 2014

PHP Program To Find Reverse Of A Number Or String

<?php
$int = "Ritu Raj";// here you can use any number or string
$reverse = strrev($int); // for reversing the string
echo "String: " . $int . "<br>";
echo "Reverse String : " . $reverse ;
?>

OutPut:

String: Ritu Raj
Reverse String : jaR utiR

No comments:

Post a Comment

Printing first 50 Fibonacci numbers Using PHP Program

Fibonacci series is a series of numbers in which each number is the sum of the two preceding numbers. For example. 0 , 1 , 1 , 2 , 3 , 5...