<?=$item ?> or <?php echo $item;?> witch is faster ? |
[eluser]Daniel Moore[/eluser]
This is from http://us.php.net/manual/en/language.bas...hpmode.php Quote:There are four different pairs of opening and closing tags which can be used in PHP. Two of those, <?php ?> and [removed] [removed], are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file. As such, while some people find short tags and ASP style tags convenient, they are less portable, and generally not recommended. and Quote:Note: As CodeIgniter outputs XHTML, it would be best to stick with <?php ?>, in my opinion. There isn't a great deal of difference between <? ?> and <?php ?>. If you say it makes it easier on designers, I disagree. If I'm working with a designer that can understand <? but not <?php, then I'm already in trouble. At least the <?php tells them that the following is PHP code so they know not to mess with it. I can explain to a designer in one paragraph how to understand the view files, PHP tags included. Not really a big deal. Whether PHP is allowing it or not isn't the question for me, it's a matter of being compliant to the standard that is being output to the browser. The only designers I have problems with are the ones that use a graphical HTML editor, which is going to output all kinds of extra garbage that is unwanted anyway, and I avoid those designers at all costs. If I'm unable to locate a designer with the savvy to truly work with HTML (with a text editor), then I'll design the project myself. There have been times when I've just hired a designer to give me a "graphical picture" of how the website should "look" and provide me with the graphics, then I'll do the actual coding to get it there. |
Welcome Guest, Not a member yet? Register Sign In |