<?php

    
/*
     * Example 16: Code reuse
     * file: 16-include-show-winner.php
     */

    
require_once("16-include-get-winner.php");
    
$ball get_winner();
    
    
$colors = array("white""royalblue""pink",
                    
"lightgreen""yellow");
    
$color $colors[floor($ball/10)];
    
?>
<div style="float: left; padding: 1em; margin: 1em; width: 1em;
            background-color: <?php echo $color?>;
            -moz-border-radius: 2em; border: 2px solid black;
            border-radius: 2em;"><?php echo $ball?></div>