Good day to all

$zaproz = mysql_query("SELECT * FROM table WHERE id='$id'",$db); $massiv = mysql_fetch_array($zaproz); echo $massiv[1]; 

When echo, the text (textarea) is displayed without indents (hyphenation to another line), but phpmyadmin itself has indents. How exactly to write text output in textarea with indents?

    1 answer 1

    Text in the form of html? Or just a text? Most likely, the description is just a text. So you need to replace the line breaks on the tag <br/>. This can be done using the function nl2br ();

     $zaproz = mysql_query("SELECT * FROM table WHERE id='$id'",$db); $massiv = mysql_fetch_array($zaproz); echo nl2br($massiv[1]); 
    • thanks, helped - frank
    • Thanks about nl2br ($ model-> information) did not know) - Silverfire