You are here: Re: File2string problem « All PHP « IT news, forums, messages
Re: File2string problem

Posted by J.O. Aho on 08/03/06 19:30

Luka M. wrote:
> Can anyone tell me why, if PHP reads from a file and puts it in a string,
> the string is not the same as the file. Not just that, but it seems that if
> I use str_replace on it, it doesen't quite work! Why could that be?

Are you using the str_replace() the right way?

$filestring = str_replace("search","replace",$filestring);
http://www.php.net/manual/en/function.str-replace.php

If you think it looks different on the webpage, then it's for HTML don't care
about new lines and multiple white spaces.


//Aho

 

Navigation:

[Reply to this 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

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