have something in one’s brain—(also: keep something in one’s brain) retain smth. in one’s memory:
- I had the great benefit of having had them [script lines] in my brain for a few years.
have something on the brain—(sl.) be obsessed with an idea, etc.:
- He blames everything that goes wrong on the taxes. He’s got taxation on the brain.
See also: have one’s mind on something / have something on one’s mind.