a simple php question i can't get answered anywhere.
Posted: Wed Dec 16, 2009 5:12 pm
Okay.. so like the title says, it's simple. At least, I think it's simple. Other people have answered this question with solutions that don't give me a result that I'm looking for so I will try to provide as much information as I can.
I'm designing a basic html website with PHP elements for a very specific purpose. The purpose is this... I'm setting up the page for someone who knows less about PHP and HTML then me, and I want it to be easy for them to make updates to the page without using any code. The solution that I felt was best was to setup a series of text files from which blocks of content on the page would come from. An example of this would be a welcome header followed by a php script which would draw a few paragraphs from a text file to fill the content below the welcome header.
By using the fread command, someone was able to teach me how to display text naturally from a website, the problem is, is that the text is losing the format it had in the text file. The specific format I'm concerned with is the paragraphs. Instead of neatly formatted paragraphs, the data is being displayed without any break. I'm trying to find a way for the information to retain it's paragraphed format without having to add any special code into the text file.
Another important element of the script is that I wont know how many paragraphs there will be in the text file. there may be one, two, five. and the amount of paragraphs may change when a new text file is uploaded to replace the last one as the website is updated.
If I've left any information out, please e-mail me at studiogipsy (at) gmail (dot) com or reply in the forum.
thank you
I'm designing a basic html website with PHP elements for a very specific purpose. The purpose is this... I'm setting up the page for someone who knows less about PHP and HTML then me, and I want it to be easy for them to make updates to the page without using any code. The solution that I felt was best was to setup a series of text files from which blocks of content on the page would come from. An example of this would be a welcome header followed by a php script which would draw a few paragraphs from a text file to fill the content below the welcome header.
By using the fread command, someone was able to teach me how to display text naturally from a website, the problem is, is that the text is losing the format it had in the text file. The specific format I'm concerned with is the paragraphs. Instead of neatly formatted paragraphs, the data is being displayed without any break. I'm trying to find a way for the information to retain it's paragraphed format without having to add any special code into the text file.
Another important element of the script is that I wont know how many paragraphs there will be in the text file. there may be one, two, five. and the amount of paragraphs may change when a new text file is uploaded to replace the last one as the website is updated.
If I've left any information out, please e-mail me at studiogipsy (at) gmail (dot) com or reply in the forum.
thank you