<?php $present=1; $min=1; $max=4; function sub() { global $present; global $max; global $min; if($present==$min) { $present=$max; } $present--; echo $present; } sub();//it works only once sub(); sub(); ?>
You have javascript disabled. You will not be able to edit any code.