Hi...
can someone tell me while the code below won't correctly parse a delimited file set up like:
file:
<url>
http://www.test.com
</url>
<blurb>
This is some text.
More text.
</blurb>
code:
while ( ! feof( $newsfile ) )
{
$line = fgets( $newsfile, 1024 );
if ($line == "<url>")
{
$line = fgets( $newsfile, 1024);
$url_val = $line;
}
if ($line == "<blurb>")
{
while ( $line != "</blurb>")
{
$blurb_val = $blurb_val . $line;
$line = fgets( $newsfile, 1024 );
}
}
}
note that the file handle $newfile is successfully opened.
thanks!