And if you fear [an enemy, then pray] on foot or riding. But when you are secure, then remember Allah [in prayer], as He has taught you that which you did not [previously] know.
English Transliteration
Fain khiftum farijalan aw rukbanan faitha amintum faothkuroo Allaha kama AAallamakum ma lam takoonoo taAAlamoona
Tafsir of Verse 239
And if you are in fear, then afoot or mounted; but when you are secure, then remember God, as He taught you the things that you knew not.
If ye fear (an enemy), pray on foot, or riding, (as may be most convenient), but when ye are in security, celebrate Allah's praises in the manner He has taught you, which ye knew not (before).