Display label character by character using javascript
<p>I am creating <strong>Hang a Man</strong> using <strong>PHP</strong>, <strong>MySQL</strong> &amp; <strong>Javascript</strong>. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where <strong>display = none</strong>. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show.
My code is:</p>

<pre><code>&lt;link href="style.css" rel="stylesheet" type="text/css" media="screen" /&gt;
&lt;?php

    include( 'config.php' );

    $question = questions();    // Get question.
    $alpha = alphabats();       // Get alphabets.

?&gt;
&lt;script language="javascript"&gt;
    function clickMe( name ){

        var question = '&lt;?php echo $question; ?&gt;';
        var questionLen = &lt;?php echo strlen($question); ?&gt;;

        for ( var i = 0; i &lt; questionLen; i++ ){
            if ( question[i] == name ){

                var link = document.getElementById( name );
                link.style.display = 'none';

                var label = document.getElementById( 'questionLabel' + i );
                label.style.display = 'block';

            }
        }
    }
&lt;/script&gt;
&lt;div&gt;
&lt;table align="center" style="border:solid 1px"&gt;
    &lt;tr&gt;
        &lt;?php
            for ( $i = 0; $i &lt; 26; $i++ ) {
                echo "&lt;td&gt;&lt;a href='#' id=$alpha[$i] name=$alpha[$i] onclick=clickMe('$alpha[$i]');&gt;". $alpha[$i] ."&lt;/a&gt;&amp;nbsp;&lt;/td&gt;";            
            }
        ?&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;br/&gt;
&lt;table align="center" style="border:solid 1px"&gt;
    &lt;tr&gt;
        &lt;?php
            for ( $i = 0; $i &lt; strlen($question); $i++ ) {
                echo "&lt;td class='question'&gt;&lt;label id=questionLabel$i &gt;". $question[$i] ."&lt;/label&gt;&lt;/td&gt;";            
            }
        ?&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
</code></pre>
