makatak88 Posted May 15, 2012 Share Posted May 15, 2012 gday all! just starting to learn php but having a liitle problem with \n forcing a line break. in my situation it simply doesnt. looking at this what have i done wrong? echo "<div class=\"imgcontainer\"><a href='$row[filename]' rel='shadowbox[thingo]'><img class= 'thumbnail' img src='$row[filename]'/></a><div class=\"thetext\">Artwork: $row[name]\nArtist:$row[artist]</div></div> "; Thanks Quote Link to comment https://forums.phpfreaks.com/topic/262577-new-line-help/ Share on other sites More sharing options...
rythemton Posted May 15, 2012 Share Posted May 15, 2012 It is creating a line break. If you view the source, you should see it. The problem is that HTML ignores line breaks. You'll have to use an HTML break, <br>. Quote Link to comment https://forums.phpfreaks.com/topic/262577-new-line-help/#findComment-1345724 Share on other sites More sharing options...
makatak88 Posted May 20, 2012 Author Share Posted May 20, 2012 thanks you! Quote Link to comment https://forums.phpfreaks.com/topic/262577-new-line-help/#findComment-1346929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.