How can I validate a checkbox array using javascript?

I am using HTML and PHP to parse the data.

HTML Code:

***
<input type="checkbox" name="game[]" id="game" value="game" />

**


PHP Code:


***
$state = Trim(stripslashes($_POST['game']));


if(isset($_POST['game']) && is_array($_POST['game']))
{
foreach($_POST['game'] as $key=>$val)
{
switch($val)
{
case 'Game Type':
$email = "myemailaddress";
$Body .