well , you can use <pre> tag to keep your format , like this:[color=blue]
> $show = file("./fields/combined/$cdp$store");
> $arrayitems = sizeof($show);
> $x=0;
> print("<pre>");[/color]
while ($x < $arrayitems) {[color=blue]
> print("$show[$x]\n");
> $x++;
> }[/color]
print("</pre>");
pkz505@yahoo.com (Paul) wrote in message news:<4c2c478e.0310110846.2faf4a1@posting.google.c om>...[color=blue]
> I have a text file that I am trying to display on a web page. If I cat
> or more the file it formats and displays fine. When it comes up in the
> browser it seems to loose tabs and the format gets messed up. This is
> how I display the file.
>
> $show = file("./fields/combined/$cdp$store");
> $arrayitems = sizeof($show);
> $x=0;
> while ($x < $arrayitems) {
> print("$show[$x]\n");
> $x++;
> }
>
> If I edit the file it has ^M at the end of each line if it matters.
> Does anyone have a better idea as to how to display it?[/color]