Tankees or altering the order of verses when reciting is haraam, whether that is during prayer or otherwise.
It says in Asna'l-Mataalib (1/63): It is haraam to switch the order of verses when reciting, because that undermines the miraculous nature of the text and it ignores the wisdom behind the order in which the verses appear. End quote.
It says in Haashiyat ad-Dasooqi (1/242): Switching the order of soorahs is makrooh, and switching the order of consecutive verses in one rakah is haraam and invalidates the prayer, because it distorts it. End quote.
It says in Kashshaaf al-Qinaa (1/343): It is makrooh to switch the order of soorahs, such as reciting al-Inshiraah (94), then reciting ad-Duha (93) after it, whether that is in one or two rakahs, because of the report narrated from Ibn Masood, according to which he was asked about someone who recited Qur'an in the wrong order. He said: His heart is disordered. Abu Ubayd explained that as referring to when a person recites one soorah, then after it he recites another that comes before it in the order (of soorahs in the Mushaf). This was mentioned by Ibn Nasrullah in ash-Sharh as being similar to the case with verses, that is, a similar ruling of it being makrooh applies in the case of switching the order of the verses. It says in al-Furoo that there is consensus on this point. Ibn Nasrullah said: If it was said that it is haraam to switch the order of verses, that would be a valid opinion. The evidence for it being only makrooh is not clear, and using as evidence the way the Prophet (blessings and peace of Allah be upon him) learned it is subject to further discussion, because that was due to need, as the Qur'aan was revealed according to events. Shaykh [Ibn Taymiyah] said: Following the order of verses is obligatory, because the order in which they appear is based on clear instructions of the Prophet (blessings and peace of Allah be upon him), according to scholarly consensus. End quote.
But if the switching of the order occurs when memorising, not when reciting or asking someone to listen so as to check one's memorisation, there is nothing wrong with that. So one may begin by memorising the fifth verse, for example, then the fourth, then when one wants to recite them, one recites the fourth verse and then the fifth, without switching the order. Then when he has memorised the third, and he wants to recite what he had memorised, he should recite them in the proper order without switching it. So he should recite the third, then the fourth, then the fifth. There is nothing wrong with this; some teachers do it this way and think that it is the best way of memorising.
To sum up: It is not permissible to recite two consecutive verses in the wrong order, and it is not permissible to switch the order of words in one verse.
For more information please see the answer to question no. 7189
And Allah knows best.
Reproduced from Islam QA