Re: HTML via echo or not
| From: | Jordan S. Jones | Date: | Tue, 30 Dec 2003 01:34:23 +0000 |
| Subject: | Re: HTML via echo or not | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173458@lists.php.net to get a copy of this message | ||
Why make PHP work harder than it needs to?
Jordan
Robin Kopetzky wrote:
Good evening. I'm probably going to stir up a hornet's nest but have a question. Does using echo for ALL html pages mean I have a sick mind? Example: echo CR, '<HTML>',-- I am nothing but a poor boy. Please Donate.. https://www.paypal.com/xclick/business=list%40racistnames.com&item_name=Jordan+S.+JonesCR, ' <BODY>', CR, ' etc...';I like the look. It's more readable, gives me a better view of variables as they are all single-quoted and stand out nicely in my editor. No messy jumping into and out of php. I have looked at a bunch of php code written by others and HEREDOC looks stupid with everything jammed against the left side of the screen, php tags within HTML breaks up the flow of properly formatted HTML, which I firmly require for all of my code, and just doesn't look right. 'print' makes you add \" to all of the HTML attributes but the 'echo' method makes everything look like php! Since all your doing is dumping text to the output subsystem, there shouldn't be any speed decrease in the code. Yes, I know, there are advocates for every kind of method to display HTML code but just wanting to get others opinions on the subject. If you wish, email me off-list @ sparkyk-AT-blackmesa-isp.net. Cheers! Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020