Ive searched and found nothing to help.
How can i open a file, and then print only its first line?
$lines=explode("\r\n",$file); echo "$lines[0]";
Right?
or: $content_array = file($file); echo $content_array[0];
With the other, it returned as the name of the file...
But that reads the entire file, where all you need is only one line - it's a waste of resource. It woul be more efficient to open the file using fopen() and read the first line using fgets().
Diego