Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spaces in text 1

Status
Not open for further replies.

IlyaV

Programmer
Jun 9, 2003
9
US
Basically I have a file that has spaces in it. I fread() it and all the spaces disapear (or at least when I later try to echo, print or fprint the data).
 
not fprint, printf, my mistake sorry.
Ilya
 
IlyaV,

Don't forget that HTML is not white space specific. If you want to display the data in a browser and have all whitespace shown as in the data enclose your chunk of data in:
Code:
<pre>
blah                 
there are 5 spaces here:     !
</pre>

Appearance is misleading.
 
Didn't work
<?php ...
print (&quot;<pre>$data</pre>&quot;);
?>
 
Nevermind.. thanks it worked, yet now the style I tried to use are not applied.:(
Ilya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top