why here str_replace not working
<?php
$str= '<div class=\"droppable\" ondrop=\"drop(event)\" ondragover=\"allowDrop(event)\"></div>';
echo str_replace('\"','"', $str);
i want to use str_replace with HTML tag.
As I get you want to remove the \s to get proper HTML.
Better way should be -
stripslashes('<div class=\"droppable\" ondrop=\"drop(event)\" ondragover=\"allowDrop(event)\"></div>');
Output
<div class="droppable" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
'\"' is literally a "slash-double-quote". It will be escaped in "\""
<div class="droppable" ondrop="drop(event)" ondragover="allowDrop(event)"></div>what's wrong with it?