I need to insert span tag after every line break in my content while echoing.
How can i achieve this?
I know that nl2br(string)it inserts the XHTML compliant.
The nl2br() function inserts HTML line breaks (<br />) in front of
each newline (\n) in a string.
- how to get
<span>tag in my content using echo or while displaying my
content after every line break in the content… - I also need to insert
<li>tag in my cotent while displaying the data
using echo
any idea.
Its simple requirement but i’m not getting
any idea how to solve this?
Any help much appreciated.
Many Thanks.
I don’t see why echoing
"<span>"wouldn’t work for you, but you can always write html in php code. For example: