Example Use a static variable in a function: <?php function add1() { static $number = 0; $number++; return $number;}echo add1();echo "";echo add1();echo "";echo add1(); ?> Try it Yourself » ❮ PHP Keywords Track your...