reverse of a number php error -
this question has answer here:
- reference - error mean in php? 30 answers
<?php $revs=0; $no=123; while($no!=0) { $revs = $revs*10; $revs = $revs +( $revs%10); $no = ($no/10); } echo revs; ?>
the code written above doesn't work shows following error
"notice: use of undefined constant revs - assumed 'revs' in /opt/lampp/htdocs/testprojct/proj.php on line 26
you forgot $ in front of revs echo it.
Comments
Post a Comment