In the game Keno you might have noticed that games begin at 001 and iterate to 999. Let’s look at some code to cycle properly and stay formatted in three digits using sprintf().

$game_number = 1;
echo ‘Game #’ . sprintf(“%03d”,$game_number); // Game #00x
 

Now let’s add some style magic to give the output a blackground with […]