FALLO RARO TEXT AREA
Publicado por juan (39 intervenciones) el 19/02/2021 10:47:09
Buenas a todos.
Me pinta prueba(ok bien).
pero si quiero meter esa variable en un text area no me realiza el replace:
Me pinta <p>prueba</p>
¿Alguien sabe que esta pasando?
Gracias.
1
2
3
4
$text=$r['comentarios'];
$text = preg_replace("#\[sp\]#" , " ",$text);
$text=preg_replace("#\[nl\]#", "<br>\n", $text);
echo$text;?></div>
Me pinta prueba(ok bien).
pero si quiero meter esa variable en un text area no me realiza el replace:
1
2
3
$text = preg_replace("#\[sp\]#" , " ",$text);
$text=preg_replace("#\[nl\]#", "<br>\n", $text);
?> <textarea maxlength="400" id="problema" style="position:relative;width:100%;height:20%" name="defecto" id="defecto" ><?echo$text?></textarea></div>
Me pinta <p>prueba</p>
¿Alguien sabe que esta pasando?
Gracias.
Valora esta pregunta


0