Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End why does this work? Re: why does this work?

#74014

Breaking that snippet down, here’s a pseudo-code version. Opening and closing PHP tags, <?php and ?>, need to be included around everything that is php code, so the server understands how to process it correctly:

Code:

… normal html code here… (only shows up if the current page is the home page)

… more normal html code… (only shows up if the current page is not the home page)

http://www.w3schools.com/php/php_if_else.asp