Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a function that returns the following multi-line string, with HTML tags included in the string (b/c the error is meant for display on an HTML page):Code: Select all
<br />
<b>Warning</b>: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in <b>/serverinfo/nusoap.php</b> on line <b>xxxx</b><br />
<br />
<b>Warning</b>: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in <b>/serverinfo/nusoap.php</b> on line <b>xxxx</b><br />
mypasswordMy thought was to use regular expressions to replace (in English)
<br />everything<br /><br />everything<br /> with ""
I am having problems forming the pattern, possibly b/c of the newline spaces within the initial string, possibly just out of bad PHP syntax. Can anyone point me to what I'm doing wrong? Here is my current attempt at a PHP/RegEx combination:
Code: Select all
$password = [what function returns]
$password = preg_replace("<br />(.*)<br />\s<br />(.*)<br />\s/s", "", $password);feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]