Hi,
I am writing a script that displays a line of text depending on what number a user enters into a textbox. It's for a sports website, and each line contains a players average, so they enter there players number and it displays the line which all of there information is on.
$file = file("http://www.ecrik.f2s.com/EHCC/EHCC/list.txt");
for ($i=$playernumber;$i<1;$i++) {
print $file[$i];
}
That is the piece of code (which I used from a post in this forum a while ago). It seems to work... no parse errors, only problem is nothing is displayed on that page. This code is inbetween the end of a print" "; piece of a code and the start of a include"";.
Eg
print "<whatever>Blah</whatever>";
$file = file("http://www.ecrik.f2s.com/EHCC/EHCC/list.txt");
for ($i=$playernumber;$i<1;$i++) {
print $file[$i];
}
include "include.inc";
Any ideas? Sorry about the long post.