something like this should work. $code = str_replace(array('<','>'),array('>','<'),$code); echo '<textarea>'.$code.'</textarea>'; PHP:
if you have the variable declared somewhere such as $money = 'This is my money PHP: echo it in your textarea like this <textarea><?php echo $money; ?> </textarea> PHP:
Its a Common Mistake, which beginners may make. textarea has no attriibute like 'value'. So you need to show content in between the opening and closing brackets like ^^linkodev said.