Form helper not outputting newline characters. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Form helper not outputting newline characters. (/showthread.php?tid=19861) |
Form helper not outputting newline characters. - El Forum - 06-21-2009 [eluser]dopple[/eluser] Hi all. This is my first question on the board since starting to use codeigniter (about 2 or 3 weeks) so I reckon I'm doing pretty well so far. The code below is outputting the html below that. Why is it all in one line? It's not a massive issue but I'd rather it was a bit more readable than that. Code: <?php Code: <form action="http://localhost/helpr/index.php/section/add_section.php" method="post" class="section" id="section"><label for="name">Section Name</label><br /><input type="text" name="name" value="" id="name" maxlength="30" size="30" /><br /><label for="remarks">Remarks</label><br /><textarea name="remarks" cols="90" rows="12" id="remarks" ></textarea><br /><input type="submit" name="submit" value="Save" /><br /></form> </div> Form helper not outputting newline characters. - El Forum - 06-21-2009 [eluser]Dam1an[/eluser] If you want the new line to appear in the source file, use echo "\n" or "\r\n" for UNIX and Windows respectively When you use echo '<b r />' thats new lines for the rendered page Form helper not outputting newline characters. - El Forum - 06-25-2009 [eluser]dopple[/eluser] Thanks Dam1an. I've done just that and it works fine. Mucho Danke! Form helper not outputting newline characters. - El Forum - 06-25-2009 [eluser]Dam1an[/eluser] Your welcome |