vb.net - Format Dynamic Text Using PHP -
i have text fields populated database, text when entered user punctuated correctly full stops , carriage returns etc.
using vb ordinary db request:
<%=(rsmyrecordset.fields.item("text").value)%> i result:
mary had little lamb. fleece white snow. even if user entered return after full stop after word lamb.
using code:
<%= replace(rsmyrecordset.fields.item("text").value, vbcrlf, "<br>") %> the text returned be:
mary had little lamb. fleece white snow. how achieve same result using php? have:
<?php echo $row_rsmyrecordset['text']; ?> many thanks
maybe looking nl2br: http://php.net/manual/function.nl2br.php
<?php echo nl2br($row_rsmyrecordset['text']); ?>
Comments
Post a Comment