Exemple #1
0
function do_html_options($options, $selected = null, $empty = '')
{
    $html = '';
    $empty && ($html .= '<option value="">' . $empty);
    foreach ($options as $value => $label) {
        $isSelected = $value == $selected ? ' selected' : '';
        $html .= '<option value="' . do_html($value) . '"' . $isSelected . '>' . do_html($label) . '</option>';
    }
    return $html;
}
Exemple #2
0
	font-family: monospace;
	font-size: 20px;
	padding: 5px;
	line-height: 1.4;
}
.used {
	color: #ccc;
}
</style>
</head>

<body>

<? if ($session['show_sentence'] >= 0): ?>
	<p style="color: green">Sentence done: <?php 
echo do_html($sentences[$session['show_sentence']]);
?>
<? endif ?>

<form method="post" autocomplete="off">
	<p>Level <?php 
echo $session['sentence'] + 1;
?>
 / <?php 
echo count($sentences);
?>
. Word <?php 
echo $session['word'] + 1;
?>
 / <?php 
echo count($session['words']);