Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ PHP Question

Posted by: John Pozadzides Feb 13 2007, 04:28 PM

Does the following serve any purpose?

CODE
<?php } ?>

It's baked into the template on my Wordpress theme, but it doesn't seem to do anything so I was going to remove it.

John

Posted by: Effovex Feb 13 2007, 04:56 PM

It probably does something if PHP isn't throwing off any errors.

It's one of the way to insert HTML into PHP.

CODE
<?PHP if(a==x) { ?>
<some html>
<?php } else { ?>
<some html>
<? } ?>


I don't really like that method, because it leads to confusion, but that's probably what's going on here.

Posted by: John Pozadzides Feb 13 2007, 05:05 PM

QUOTE(Effovex @ Feb 13 2007, 03:56 PM) *

It's one of the way to insert HTML into PHP.

I don't really like that method, because it leads to confusion, but that's probably what's going on here.

Thanks. You are right. It was an if/else statement about whether to use an internal or external stylesheet.

I'm removing that whole thing because it ends up making an additional PHP call for no reason because I only use the exteral style sheet. cool.gif

John

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)