in_array if $massive = $insteredname
    <?
    $nimi = $_POST['nimi'];
    $nimed = $_POST['nimed'];
    if ($nimi) {
    	if ($nimed) {
    		$nimed .= ', ' .$nimi;
    	}
    	else {
    		$nimed = $nimi;
    	}
    }
    ?>
    <html>
    <form method="post">
    Sisesta nimi:
    <input type="text" name="nimi" size="9" />
    <input type="hidden" name="nimed" value="<?= $nimed ?>" />
    <input type="submit" value="Lisa" />
    </form>
    <?
    $m = explode(', ',$nimed);
    sort ($m);
    if ($nimi) {
    	echo '<ol>';
    	foreach ($m as $nimi) {
    		echo "<li>$nimi<br /></li>";
    	}
    }
    echo '</ol>';
    ?>
    </html>

i don´t where and how blablabla to put

    if (in_array($nimi,$m)) {}

in_array if $massive = $insteredname
===

    <?
    $nimi = $_POST['nimi'];
    $nimed = $_POST['nimed'];
    if ($nimi) {
    	if ($nimed) {
    		$nimed .= ', ' .$nimi;
    	}
    	else {
    		$nimed = $nimi;
    	}
    }
    ?>
    <html>
    <form method="post">
    Sisesta nimi:
    <input type="text" name="nimi" size="9" />
    <input type="hidden" name="nimed" value="<?= $nimed ?>" />
    <input type="submit" value="Lisa" />
    </form>
    <?
    $m = explode(', ',$nimed);
    sort ($m);
    if ($nimi) {
    	echo '<ol>';
    	foreach ($m as $nimi) {
    		echo "<li>$nimi<br /></li>";
    	}
    }
    echo '</ol>';
    ?>
    </html>

i don´t where and how blablabla to put

    if (in_array($nimi,$m)) {}
