Argh. right, yeah yeah ive posted 3 trilion times here today. everyones help has been cool. but htis is silly right....
Ive got this php script reading a txt file.. when it reaches the correct line, it outputs it, and puts "line=" in front. so it should output something like:
line=hello world
ive got this to do that so that flash can read the variable 'line' and print it in the movie. makes sense? when php does it, it puts a new line, then prints line=etc.....
flash needs the variable to be on the top line or it cant read it (ive done experiments with txt files. variable on teh top line: everything good. variable on the 2nd line: flash hates me.
Heres the code. can you see whats wrong?
<?php
$fp = fopen ("data.txt",'r');
flock($fp,1);
while (! feof($fp)){
$line=fgets($fp,1000);
if (strstr($line,$id)) {
$newline=substr($line,12);
print "line=".$newline;
}
}
flock ($fp,3);
fclose ($fp);
?>