php不能正确处理textarea标记,并且在我使用textarea时显示其余的html标记


php does not work correctly with textarea tag and displays the rest of the html tags when i use textarea

所以我有这个代码:

<?php
    echo "<textarea style='width:500px; height:600px'>";
    while($extract = $result->fetch_array())
    {
        echo "<span class='usr'>" . $extract['usr'] . "</span>: <span class='msg'>" . $extract['msg'] . "</span><br/>";
    }
    echo "</textarea>";
    $result->close();
    $conexion->close();
?>

文本区域的输出给我的是:

<span class='usr'>dsdsds</span>: <span class='msg'>aaaaa</span><br/>

不能在<textarea>中使用HTML代码来呈现HTML。

在文本区域中呈现HTML