<lecture type="friendly"> Just fyi: this is a client-side operation, so your PHP makes it harder to deal with. Post generated (served) HTML/JS that can be modified. The easier you make it, the likelier you are to get a documented answer. </lecture> 
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>untitled</title>
<script type="text/javascript" language="javascript">
function toggleGrp(oCheckbox)
{
var bWhich = oCheckbox.checked;
var c = 1, box, grp = oCheckbox.form[oCheckbox.name];
while (box = grp[c++])
{
if (bWhich)
box.checked = false;
else box.checked = box.wasChecked || false;
box.disabled = bWhich;
}
return true;
}
</script>
</head>
<body>
<form>
<input type="checkbox" name="options[]" onclick="return toggleGrp(this)">____<strong>master</strong><br /><br />
<input type="checkbox" name="options[]" onclick="this.wasChecked=this.checked">__box 1<br />
<input type="checkbox" name="options[]" onclick="this.wasChecked=this.checked">__box 2<br />
<input type="checkbox" name="options[]" onclick="this.wasChecked=this.checked">__box 3<br />
<input type="checkbox" name="options[]" onclick="this.wasChecked=this.checked">__box 4<br />
</form>
</body>
</html>
Added a little touch: the previously checked boxes 'return' if the main box is unchecked. If you don't care for that, just remove the green lines.
cheers, adios
Bookmarks