newline and pregreplace

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

 



I've got a line like this:
$str=preg_replace( "-regex here-", '\n<note>\1</note>', $str);

Which has one of two problems: If I leave the single quotes around the
second argument, then it returns as \n and not a newline. If I change
the single quotes to double quotes, then the info from the regex is
not inserted in place of the \1.

What is one to do in these situations?

Dotan
http://lyricslist.com/lyrics/artist_albums/273/jackson_michael.php
Michael Jachson Lyrics

-- 
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