Reply to Firefox/Explorer problem

Your name:

Reply:


Posted by Dan Pearce on 07/05/06 13:57

Processing some text from an external text file into a web page. If I
use this:

<?
$s = file_get_contents('text.txt');
$search = array("@\r\n@si");

$replace = array('</br>');

echo preg_replace($search, $replace, $s);
?>

Explorer shows the text as it appears in the file;

This is some test text
This is some test text

This is some test text
This is some test text

but Firefox displays

This is some test textThis is some test textThis is some test textThis
is some test text

Now if I use

<?
$s = file_get_contents('text.txt');
$search = array("@\r\n@si");

$replace = array('<br></br>');

echo preg_replace($search, $replace, $s);
?>

The firefox output is correct but Explorer now double spaces everything

This is some test text

This is some test text



This is some test text

This is some test text

Any ideas on how to correct this? Thanks in advance for your time.

Dan

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация