Hi all,

I queried results form MySQL database using php and stored the results in a text file. Now i want to store the text file contents in a single string variable. I would be thankful if anyone could help me with this.

Thanking you.

Have a nice day.


Recommended Answers

All 3 Replies

have you tried

$single_variable = file_get_contents('name_of_file');

ohh gr8....thanks very much

Please mark the thread as solved if this solution works for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.