It was narrated that Abu Hurairah said:
The Messenger of Allah (saas) used to say: 'Allahummanfa'ni bima 'allamtani, wa 'allimni ma yanfa'uni, wa zidni 'ilman, wal-hamdu lillahi 'ala kulli hal, wa a'udhu billahi min 'adhabin-nar (O Allah, benefit me by that which You have taught me, and teach me that which will benefit me, and increase me in knowledge. Praise is to Allah in all situations, and I seek refuge with Allah from the torment of the Fire).'