it should display in the textarea "car1>>car2" instead it displays "car1>>car2"

try this code... it doesn't work. put your mouseover "test".

<?php
$sumz= "car1>>car2";

$textsearch = array('&amp;lt;','&amp;gt;');
$textreplace = array ('<','>');
$textareatext = "$sumz";


            echo "<div style='display:none;' id='1'>".str_replace($textsearch,$textreplace,htmlentities($textareatext))."</div>";
			echo "<table><tr><td onmouseover='Test(1);'>test </td></tr></table>";

echo "<br /><br /><textarea name='reply' id='reply' style='color: #000000; overflow: hidden; font-size:15px; height:52px; width:500px; text-align: left' readonly='readonly'  >test</textarea>";
?>

<script type="text/javascript">
function Test(number) {
var newtext = document.getElementById(number).innerHTML;
   document.getElementById('reply').value = newtext;
   }
</script>

any help?

Replace &amp; with & on line 4,5

nvm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.