Cross one`s mind

To think of something, to occur to someone.

It crossed my mind that I will see my friend in the evening, so I do not need to phone him.