Working with Static Variables in Functions
<?php function statictest() { static $count = 0; $count++; return $count; } statictest(); statictest(); $foo = statictest(); echo "The statictest() function ran $foo times.<BR>"; ?>