Page 1 of 1

Micro$oft Word

Posted: Mon Jun 23, 2003 6:15 pm
by mikusan
Hey, i hoped i would never come to this but here i am, i need to read a microsoft file. Import it into a string, hopefully. But i mainly have to be able to edit something and then diplay it, in a small window of mine.

Is this even possible?

Posted: Mon Jun 23, 2003 6:27 pm
by mikusan
In the worst case scenario, could someone tell me how can i transform line breaks to <BR>. That run the following code:

Code: Select all

$array = file($CFG['path_layout'] . 'files/menu/' . $Data[0]);
	$mkstring = implode ('', $array);
Where $Data[0] is the name of the file...

When i output the contents of $mkstring to my error log, i see that the text of the file has all the linebreaks intact, but when i output to the browser, they are not considered.

Now what is the correct way to do this? Should i keep it as an array and after each array value i place a <BR>? is there a more profesional way?

This is a solution using a text file instead of word...thanks

Posted: Tue Jun 24, 2003 3:45 am
by twigletmac
You could add the line breaks in your implode() statement:

Code: Select all

$mkstring = implode('<br />', $array);
Mac