Echo variable value having tags inside into textarea content

Viewed 27

When I call my variable value which has tags and style attribute inside it into my textarea content then it instead of showing exact like original output. Inside textarea its showing tag too. Textarea View My variable has value like this:

$abc = '<span style="color: red;">'.$convertingoffset.'</span>';    //character value
$result_offset= str_replace_first($realone, $ofsetsplit, $str);     // replacing characters

Calling inside textarea:

<textarea name="textarea" rows="9"><?php echo htmlentities($result_offset);?></textarea>

Anyway to show it inside as the variable shows in echo?

0 Answers
Related