Occur to (someone)

To come into someone’s mind (an idea or thought).

It occurred to me that I will not be able to meet my friend on Saturday because I have to go to the airport to meet someone else.