Capturing a return value : Parameters « Functions « PHP
- PHP
- Functions
- Parameters
Capturing a return value
<?
function countdown($top) {
while ($top > 0) {
print "$top..";
$top--;
}
print "boom!\n";
}
$counter = 5;
countdown($counter);
print "Now, counter is $counter";
?>
Related examples in the same category