How To Write Data Retrieved Using Php From Mysql To A Txt File

I retrived data from mysql(wamp server) using php , now i want to write those data that was retrieved , to a . txt file is it possible? 

Order a Similar or Custom Paper from our Writers