I have been trying for several days to find a solution, in php it is a bullshit and I have managed to solve it, but when it comes to coupling it to my impossible wordpress page.
The problem is the following one I want to create a list for each line obtained from the database, <li>EJEMPLO</li>
The issue is that I try to find when it is a "\n" o "<br />"
and never finds it or because it omits characters.
In the database the data is stored with a textarea that respects the line breaks.
Then I leave the code.
for($i=0;$i<strlen(nl2br($row['starter']));$i++){
if($row['starter'][$i]=="\n"){
echo "<li>";
}else{
if(ctype_upper($resul[0][$i])){
echo $row['starter'][$i];
}else{
echo $row['starter'][$i];
}
}
}