June 30th, 2000, 12:51 AM
Join Date: Mar 2000
Time spent in forums: < 1 sec
Reputation Power: 0
You can use the following code may be it will solve your problem.
for text file open
$fp = foprn("textfile.txt","r");
$line_no = 1;
while($line = fgets($fp,80))
if you any problem pls let me know the details
Thanks and Regards
Chennai - india
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Chris Pickett:
I want to read a text file into an array and then check each element to see if it is over 80 chars, and if it is to go to the nearest space before or the 80th char, and move it into the next element. Basically I want to do justified paragraphs server-side, so that I then can add line numbers to the edge, so that it can be used as a legal type document. Has anyone done anything like this before?