Is it grammatical to say "according to the law" instead of "according the law"?
If so, is there any difference in meaning?
When an average person hears the words according and law, the first thing that probably comes to their mind is the expression according to the law. So, no, according the law is incorrect. You should always say according to the law. according to something is actually a set phrase in English and you just can't leave the to out from it. It's part of the expression and therefore it must be there. Nor can you say according of the law. Again, that's just incorrect grammar.
However, according the law would still be grammatically correct, but it would mean a completely different thing. In this case, according is the present participle of the verb to accord which means to give or grant something to someone. For example:
Accord the law the necessary status in society is a task of the highest priority if we are to build a fair and just legal system.
In the usual context of these words, as others have pointed out, one invariably says 'according to the law'.
However, you can use 'according the law', just not in the context you're referring to. To illustrate:
In areas of open lawlessness, according the law the respect it deserves can be difficult, if not impossible to achieve.
This obviously uses 'according' as a verb, not a preposition as in the example sentences.
I mention this usage as I don't think "No, according the law is completely incorrect," or "Only “according to the law” is correct" are entirely correct.
Kevin notes: This usage is dated and seldom used anymore.
"According to" is a set phrase in English to indicate where something is specified. You can't just drop the "to" and expect it to have the same meaning.
The verb to accord has a number of meanings; the only sense in which it could abut a noun phrase like that is as a transitive verb; example: "I was according the law the respect it deserves". That's unlikely to be the sense intended here.
“According the law” is ungrammatical. Only “according to the law” is correct.
"According to" is certainly far more common in current usage. I cannot imagine dropping the "to" except perhaps in some unusual, perhaps archaic, construction.
OED lists according as an adverb and notes that it's "usually" according to. They also list a second sense as according as.