![]() |
PHP/CI ruining tabbing and ignoring new lines in document - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: PHP/CI ruining tabbing and ignoring new lines in document (/showthread.php?tid=15524) |
PHP/CI ruining tabbing and ignoring new lines in document - El Forum - 02-07-2009 [eluser]gh0st[/eluser] I'm having an issue with CI ruining the tabbing in my PHP documents and ignoring new lines, despite me putting them in the PHP document. The document is saved as UTF-8. The HTML is using the UTF-8 in the charset. For example; Code: Date?<br /> Notice the end select is on a new line, and the output is implied to be one per line... but everything is being outputted on ONE line -- even the end select tag is appended on the end of the huge option list. Why does PHP/CI do this and how do I fix it? Code: Date?<br /> PHP/CI ruining tabbing and ignoring new lines in document - El Forum - 02-07-2009 [eluser]Developer13[/eluser] $output = ('<option value="'.$i.'"'.$sel.'>'.$i.'</option>'); should be $output = ('<option value="'.$i.'"'.$sel.'>'.$i."</option>\r\n"); Notice the double quotes and not single quotes wrapping the closing tag. PHP/CI ruining tabbing and ignoring new lines in document - El Forum - 02-08-2009 [eluser]gh0st[/eluser] Ah many thanks! |