Re: eof bof in php

From: Date: Mon, 22 Dec 2008 19:47:44 +0000
Subject: Re: eof bof in php
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-284971@lists.php.net to get a copy of this message
On Mon, 2008-12-22 at 14:21 -0500, Anthony Gentile wrote: > I would argue it is better practice as: > > <h1><?php echo 'Hello World'; ?></h1> > > than > > <?php > echo "<h1>Hello World</h1>"; > ?> > Anthony Gentile > > > On Mon, Dec 22, 2008 at 9:18 AM, tedd <tedd.sperling@gmail.com> wrote: > > > At 1:21 PM -0500 12/21/08, Anthony Gentile wrote: > > > >> -snip exampe- > >> > >> > >> is probably going to give you the result you want. However you should know > >> it is bad practice to mix PHP and HTML as horridly as I just showed you. > >> AKA > >> you don't want your PHP writing your HTML. > >> > >> Anthony Gentile > >> > > > > Anthony: > > > > Granted, the example you gave was a bit mixed, but it's perfectly Okay to > > have php write html. In fact, if you think about it that's the only way php > > can express itself to the user. A simple echo($var) is writing html to a > > browser. > > > > Good practice should to write code (i.e., php, mysql, css, html, js) that > > is semantic and compliant with standards. Mixing them well is almost an art > > form that observes best practices in all. > > > > Cheers, > > > > tedd > > > > -- > > ------- > > http://sperling.com > > http://ancientstones.com > > http://earthstones.com > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > Why?! As you've seen, it can get awfully messy very quickly... Ash www.ashleysheridan.co.uk

« previous php.general (#284971) next »