Hi all,

Just wondering if anyone can shed some light on the following issue for me.

I'm pulling in a websites title, description and keywords using the following code:

PHP Code:
<?php
//open meta file
$this_page "home";
$text_file "meta/".$this_page.".txt";
$fp = @fopen($text_file"r");
$text_line = array();
while(!(
feof($fp)))
{
    
$text_line[] = fgets($fp4096);
}
for (
$i=count($text_line);$i<6;$i++)
{
    
$text_line[] = '';
}
fclose($fp);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $text_line[1];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="<?php echo $text_line[2];?>" />  
<meta name="keywords" content="<?php echo $text_line[3];?>" />
<link href="css/default.css" rel="stylesheet" type="text/css" />
Now the problem I have is that when the content is populated the source code view looks like this:

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
title>some text here
</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
meta name="description" content="some text here. 
/>  
<
meta name="keywords" content=", ivr, sms, text, voicexml ivr, ivr hosting, ivr platform, ivr server, ivr applications, interactive voice response, ivr,  sms
/>
<
link href="css/default.css" rel="stylesheet" type="text/css" /> 
So for some reason after the last line of text it is moving the end tag instead of it being after the last line of text. Can anyone please tell me why this is occuring and how to possibly fix it so the end tags are after the last piece of text.

Many thanks