I hope you don't mind ApacheTech, I undeleted your post with code for ASP.NET because I think all options should be on the table.
But no, as far as I know PHP cannot do anything like that.
In the absence of server side code that can really handle this, like you say ASP.NET can, I think javascript is the right way to do this. It's a convenience to be able to check all/uncheck all. If javascript is unavailable, then the user is only mildly inconvenienced. About 99% of users have javascript enabled anyway.
If using javascript, you can have javascript create the check all/uncheck all checkbox. Non-javascript users won't even know what they're missing.
Or looking at it the other way, you could hard code it and have it disabled. If javascript is present, use javascript to enable it. You could even have a small subtext stating:
"Javascript required for this feature"
right by the disabled checkbox. If javascript is present, have it remove that subtext at the same time it enables the checkbox.

