reversal_num.php function reversing_num(){ $num = 765432; //需要倒转的数字 $rebmnu = 0; $temp = $num ; do{ $rebmnu = $rebmnu*10 + $temp % 10; $temp = $temp/10; } while($temp0); var_dump($rebmnu);}// 234567
function reversing_num(){ $num = 765432; //需要倒转的数字 $rebmnu = 0; $temp = $num ; do{ $rebmnu = $rebmnu*10 + $temp % 10; $temp = $temp/10; } while($temp>0); var_dump($rebmnu); } // 234567