know something by heart—be able to quote smth. from memory:
- Few lawyers know by heart the complicated statutes relating to Church matters.
know something in one’s heart—realize smth. in the depths of one’s mind:
- Every soldier knows in his heart that he was not made to fire upon the citizens.