I want to add a new line and when I tried "/n", it did not work.

`while($row_selecttemptable = mysql_fetch_array($result_selecttemptable))

          echo $row_selecttemptable['ArtistName'] . ' ,' . $row_selecttemptable['NAMEOfTheDVD'];`

I want to add a new line between ArtistName and Name of The DVD

Newline in HTML is <br> tag (a break):

echo $row_selecttemptable['ArtistName'] . ' ,<br>' . $row_selecttemptable['NAMEOfTheDVD'];`

And if you wish to simply print text with a newline in it, it's \n, not /n.

Member Avatar
diafol

As both above but \n will only work when in double quotes - not single quotes. Single quotes will output the literal backslash and n.

Thank You very much, for all your respones. I would just like to add that the "\n" did not work(for me), but the br did.

Thanks You.

Member Avatar
diafol

As a follow up - "\n" will show up correctly if you're prettifying your html output (view source in the browser).

Well. it only put a space but it did not actually go to a newline

Member Avatar
diafol

Well. it only put a space but it did not actually go to a newline

\n won't show in general browser view, only in view source or in a textarea.