Reply to String format problem

Your name:

Reply:


Posted by Ahmed Abdel-Aliem on 09/29/86 11:25

hi
i have a problem when i am formating a string
the problem is it converts the \n in the string to a new line
here is the code

<?
$Text = "D:\AppServ\www\intranet\admin\store\nodirectory\sub";
$Replace = "D:\AppServ\www\intranet\admin\store";
$with = "http://localhost/bank/admin/store";

//$doc = str_replace ($Replace, $with, $Text);
$doc = str_replace( '\\', '/', str_replace( $Replace, $with, $Text ) );

echo $doc;

//i need $Doc to look like this
http://localhost/bank/admin/store/nodirectory/sub
//but it outputs http://localhost/bank/admin/store odirectory/sub


?>
can any one help me with that plz
thanks in advance

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

[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

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