[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'
functions.
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:
<?php
$arrText = file("Name_of_File.txt");
for ($i = 0; $i < count($arrText); $i++) {
echo("<tr>$arrText[$i]"." "."</tr>");
}
?>
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]");
HTH,
RonL.
-----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
open
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
into
the middle of the Home page.
More information about the thelist
mailing list