1. I don't know anyone in my class.

2. In my class, I don't know anyone.
=============================
In #1, what is the part of speech of 'in my class'? Does 'in my class' modify 'anyone' or 'know'? In #2, 'In my class' is an adverbial phrase, right?

"in my class" is a prepositional phrase:

in = preposition
my = possessive pronoun (modifying "class")
class = noun, object of the preposition "in"

In both sentences, the phrase modifies "anyone."