I am really new to php and I have attached the code for reading in text file 1 that works well. Could you take a look and see how I would do what you mentioned to get text file 2 incorporated as well.
<?php
include("vars.php");
$fp=fopen($textfile1,'r');
$FileContents=fread($fp, filesize ($textfile1));
fclose($fp);
$fp=fopen($xml_output_dir.$xml_output1,'w');
fclose($fp);
$FileData= explode("", $FileContents);
$output.= "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
$output.= "<properties>\n";
for($i=0;$i<count($FileData);$i++)
{
$Data = explode("¦", $FileData[$i]);
for($c=0;$c<10;$c++)
{$Result[$c]=trim($Data[$c]); }
$c=0;
$image=$Result[3];
$conv_image=eregi_replace(",", " " , $image);
$len=strpos($conv_image," ");
$Result[3]=substr($conv_image,0,$len);
$output.= " <property>\n";
$output.= " <property_ref>{$Result[0]}</property_ref>\n";
$output.= " <location>{$Result[1]}</location>\n";
$output.= " <price>{$Result[2]}</price>\n";
$output.= " <main_image>{$Result[3]}</main_image>\n";
$output.= " <bullet1>{$Result[4]}</bullet1>\n";
$output.= " <bullet2>{$Result[5]}</bullet2>\n";
$output.= " <bullet3>{$Result[6]}</bullet3>\n";
$output.= " <bullet4>{$Result[7]}</bullet4>\n";
$output.= " <bullet5>{$Result[8]}</bullet5>\n";
$output.= " <bullet6>{$Result[9]}</bullet6>\n";
$output.= " <bullet7>{$Result[10]}</bullet7>\n";
$output.= " <bullet8>{$Result[11]}</bullet8>\n";
$output.= " </property>\n";
}
$output.= "</properties>\n";
$fp=fopen($xml_output_dir.$xml_output1,'w');
fwrite($fp,$output);
fclose($fp);
?>