Re: String format problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/31/05, Ahmed Abdel-Aliem <me2resh@xxxxxxxxx> wrote:
> 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";;

Don't use double quotes if you don't want escape sequences to be expanded.

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

  -robin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux