loosecannon1
Programmer
Hello All -
I have some text(paragraphs, tables, ordered and unordered lists) stored in variable $text_block. I need to convert every "\n" into "<br>". The kicker is that the conversion only needs to takes place within <ol> or <ul> tags.
I've been unsuccessful at trying to determine if the "\n" is within a list or possible a nested list, or not, with conditional statements and regexs.
I'm really stumped and would appreciate *any* suggestions
I have some text(paragraphs, tables, ordered and unordered lists) stored in variable $text_block. I need to convert every "\n" into "<br>". The kicker is that the conversion only needs to takes place within <ol> or <ul> tags.
I've been unsuccessful at trying to determine if the "\n" is within a list or possible a nested list, or not, with conditional statements and regexs.
I'm really stumped and would appreciate *any* suggestions