0
Reverse a number without using in built function in php.
<?php function reverse($x) { $flag = 0; For($i=1;$i<=$x;$i++) { $new = $x%10; $flag = $flag*10+$new; $x = $x/10; } echo $flag; } Reverse(786); ?>
1 Antwort
+ 5
Thanks but do this in code playground please :)