I try it, it does !?
Try cut-and-paste this.
If it doesn't work, maybe we don't understand each other ?
8<--------------------------------
$string = "Computers_and_Internet&gt;Multimedia&gt;Audio&gt;Formats&gt;MP3";
$mot = "&gt;";
$rep = "/";
Echo htmlentities( $string ).'<br>';
Echo htmlentities( str_replace( $mot, $rep, $string )).'<br>';
8<--------------------------------