Jump to content

Archived

This topic is now archived and is closed to further replies.

Patrick3002

String replace help

Recommended Posts

Hi, i was wondering if anyone could help me with this code:

[code]<form name="strreplace" action="strreplace.php" method="post">
<textarea name="main" cols="50" rows="40" wrap="VIRTUAL" id="main"></textarea>
<input type="submit" value="Submit">
</form>

<?

$main=$_POST['main'];
$main = str_replace("c:","<br>f:","$main");

echo nl2br(stripslashes($main));

?>
[/code]

Now i was wondering instead of replacing "c:" with "f:" is it possible to replace a [u][i][b]"[/b][/i][/u] with [u][i][b]\"[/b][/i][/u]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.