hi, below i have a code that im not sure why it doesnt work.
i have a news.php file and a text files at data/news.txt on my webserver.
<body bgcolor="#C6D6EF">
<BASE HREF="<? include ("/data/basehref.txt") ?>">
<?php
// get a web page into an array and print it out
$fcontents = file ("data/news.txt");
while (list ($line_num, $line) = each ($fcontents)) {
echo ($line_num). htmlspecialchars ($line) . "<br>\n";
}
?>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000" bgcolor="#FFFEFB" bordercolorlight="#000000" bordercolordark="#000000">
<tr>
<td>
<div align="center">
<table border="0" cellpadding="0" cellspacing="4" width="100%">
<tr>
<td width="100%"><font face="Arial" size="2"><? echo $line(1); ?></font></td>
</tr>
<tr>
<td width="100%"><font face="Arial" size="2">text1</font></td>
</tr>
extract only. Now why doesnt it print what is on line 1 in that .txt file? any help greatly appreciated.