Hi everyone, I have a slight problem that I hope you can help me with.

I am trying to write a website to display the poems and songs my grandfather wrote beore passing away.

Seeing as most of his work was poems the formatting is important!

Ideally what I would like would be to place each poem in a seperate text file and then using php call the file and display the contents with its original formatting.

If its not possible to do in php I wouldn't be adverse to using another language.

Any help would be greatly appreciated.

Regards,

Darragh

Recommended Answers

All 2 Replies

You can just use file_get_contents to, well, get the contents of the file then when you output it just wrap it in a <pre> tag to keep the original formatting.

Looks like I am an idiot! Works just right thank 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.