hello,
i hv a problem on reading from a txt file. below is my work, may i know wat hv i done wrong.
//read from a file call file.txt to get the value in it
$fp = fopen( "file.txt" , 'r' );
$str = fread( $fp , filesize( "file.txt" ) );
$fp = fclose( $fp );
$fp = file("file.txt");
$realtime = $str; //value that need to use for counter
//read from the MyTest.file
$swf = file("MyTest.txt");
$j = count($swf);
for($i=$realtime; $i<$j; $i++)
{
echo $realtime;
echo $j;
echo $swf[$i];
}
the problem i'm facing is it cannot echo $swf[$i].
hope anyone there can help me.
thank you.
regards
elmo