PHP array field with javascript
<p>I'm using an array to add data to my database, and JavaScript to show and hide field depending on yes and no.</p>

<pre><code>&lt;input type="radio" id="medication1" name="medication[]" value="Yes" /&gt;
&lt;input type="radio" id="medication2" name="medication[]" value="No" /&gt;


 $("#show").hide();
        $("input[name=medication]").click(function()
        {
            if ($("#medication1").attr('checked'))
                $("#show2").hide();
            if ($("#medication2").attr('checked'))
                $("#show2").show();
        });
</code></pre>

<p>Without the array block quotes it works perfectly but once I add them it doesn't. Is there maybe a way I can get around this?</p>
