+ 1

How to print reverse of any given number using do.. while loop in php?

https://code.sololearn.com/wmH5w7RGJe4b/?ref=app

23rd Nov 2017, 7:13 AM
Subhum Kumar
Subhum Kumar - avatar
2 Answers
0
$num = 23456; $revnum = 0; while ($num > 1) { $rem = $num % 10; $revnum = ($revnum * 10) + $rem; $num = ($num / 10); } echo "Reverse number of 23456 is: $revnum"; source : https://www.javatpoint.com/php-reverse-number
25th Nov 2017, 10:24 AM
Momo Belia
Momo Belia - avatar
0
i want to perform task using do while loop.
25th Nov 2017, 6:21 PM
Subhum Kumar
Subhum Kumar - avatar