Search code examples
phphtmlmarquee

Load text from file & display in marquee (php & html)


I need to load text from a .txt file and display it on a marquee so when I change what it displays I don't have to go and change all of the pages.

Here's my code:

<marquee behavior="scroll" direction="left"><?php include('../Files/marquee/Main_Marquee.txt'); ?></marquee>

The text loads and that's it.

This screenshot is the where I'm loading the text from a file. http://prntscr.com/7ysws3

And this is the one where I manually enter the text into the document. http://prntscr.com/7ysxc9

Thanks -Adam


Solution

  • <marquee behavior="scroll" direction="left"><?php echo file_get_contents('../Files/marquee/Main_Marquee.txt'); ?></marquee>