I just think it's unkind of him, or at least very bad judgment, to tell you he's attracted if he's not in a position to act on it. What good does it do you to know? If he's unavailable, his telling you suggests that he's open to having you on the side. I'm not suggesting he can't be a friend, just that as a friend he should be happy to be held to (or to hold himself to, even) a higher standard, to treat you respectfully and kindly.
I have plenty of male friends whom I'm sure harbor some attraction to me. (They're only human, after all. Hubba hubba, etc.) It's their relative ability to be the custodians of their own emotional life though, and to be respectful of me even at times they are arguing with their wives or bored or whatever else might compel a lesser man to look for love on the side, that allows those friendships to continue. I just don't think there's much to gain in thinking much of the affections of a person who still has the comforts of another relationship.