# Problem in str\_replace(" "," "," "); in PHP

**URL:** https://forum.kirupa.com/t/problem-in-str-replace-in-php/150385
**Category:** Uncategorized
**Created:** [June 7, 2005, 5:48am UTC](https://forum.kirupa.com/t/problem-in-str-replace-in-php/150385 "2005-06-07T05:48:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![zyklone](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zyklone](https://forum.kirupa.com/u/zyklone)
#### Post date: [June 7, 2005, 5:48am UTC](https://forum.kirupa.com/t/problem-in-str-replace-in-php/150385/1 "2005-06-07T05:48:44Z")

</div>

im creating a forum for my website. just like any forum, it has some formatting tools like BOLD, ITALICS, UNDERLINE, CODE…and i disabled any HTML tags using str\_replace("\<","\<","$txt") and str\_replace("\>","\>","$txt") and i used to create my own tags…for example for bold, for underline and so on using str\_replace("\*\*","\<b\>","$txt")… my problem is when it comes to

```auto
..we all know that any codes or statements in any languages use double quotation (" ")... for example: &lt;?php echo "hello";?&gt;. i can't print the double quote when i used str_replace(""","&quot;","$txt") i got an error and when i used str_replace("\"","&quot;","$txt") and it prints (\") not exactly (") even in single quote it doesnt work. i hope you'll help me get rid of this problem. thanks!
```
