New to PHP, wondering how I would convert the code below to a PHP equivalent:
<%= Replace(rsMyRecordset.Fields.Item("full_desc").Value, VbCrLf, "<br>") %>
Many thank Tony
New to PHP, wondering how I would convert the code below to a PHP equivalent:
<%= Replace(rsMyRecordset.Fields.Item("full_desc").Value, VbCrLf, "<br>") %>
Many thank Tony
Look at the PHP Documentation for str_replace
Specifically for cr and lf, the characters are and
I would be wary of using as a line ending though. If you are sure that your text will use as line endings then you will be fine. However, it may be a good idea to look into a more thorough method of detecting line endings to replace them. PHP contains the function nl2br which should do this for you.