We help IT Professionals succeed at work.
Get Started

PHP -> SQL result to a txt file

AUCKLANDIT
AUCKLANDIT asked
on
229 Views
Last Modified: 2013-12-12
Hello,

I need to save a MYSQL result to a text file, I can kind of get it to work using $fd=fopen($filename,"w");
but I need input extra words and spacing etc into the text result into the text file.

The data in the table is: (CAPITALS is the row name, other is the data)

USERNAME: blabla
DOB: 05/05/2000
PHONE: 0303030
ADDRESS 1: 33 Tree Lane
ADDRESS 2: Bushland
STATE: CA


Ideally the saved result would look like this,

[blabla]
Age today: 10
Phone: 0303030
Address: 33 Tree Lane
                Bushland
                CA

Any idea's?
Comment
Watch Question
Project Manager
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE