ok, i'm having no luck with this.
my strategy seems to work in theory:
while the article count is less than 3 read a line.
if the line is an * then add 1 to the article count
if not then print the line
repeat
does that sound right?
why does this script print absolutely nothing?
$n = fopen ("news.inc", "r"); // file handle
$p = 3; // number of articles to display all together
$b = 0; // number of articles displayed so far
$l = "*"; // separator
$o = ""; // line contents
while ($b < $p) {
$o = fgets($n, 4096);
if ($o = $l):
$b = $b + 1;
else:
echo $o;
endif;
}
fclose ($n);
any help is greatly appreciated.
Thanks,