[thelist] PHP help with fopen (I think)

Luther, Ron Ron.Luther at COMPAQ.com
Fri Mar 15 15:56:00 CST 2002

Hi Tara,

I'm not a PHP wizard, so I can't help you with the tricky 'explode'

But if all you are trying to do is read in the lines of a text file,
this is working for me on a page or two:

	$arrText = file("Name_of_File.txt");
	for ($i = 0; $i < count($arrText); $i++) {

My guess is that if you only want the first line of your text file - you
could kill the loop and just echo("$arrText[0]");



-----Original Message-----
From: Tara Cleveland [mailto:tara at taracleveland.com]

Okay, so I've got this page (call it "Home"). I want the Home page to
another page (call it "text"). I want the Home page to take the first
sentence on the text page (not a whole HTML page just text), and put it
the middle of the Home page.

More information about the thelist mailing list