Block HTML Control
| From: | Seth Willits | Date: | Tue, 02 Sep 2003 07:00:28 +0000 |
| Subject: | Block HTML Control | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161423@lists.php.net to get a copy of this message | ||
I'd like to show a big chunk of HTML if a particular variable is true, and if its false I'd like to show a different big chunk of html. Right now the only way I know of doing this is:
if ($var) {
print '
<lots>
<of>
<html>
';
} else {
print '
<lots>
<of>
<html>
';
}
This works, but it destroys the syntax coloring of the html making it all one solid color. I'd love to know if there's a better way OTHER than include()ing different files.
Seth Willits
---------------------------------------------------------------------------
President and Head Developer of Freak Software - http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine - http://www.rbdeveloper.com
Webmaster for REALbasic Game Central - http://www.freaksw.com/rbgames
"Knowledge is limited. Imagination encircles the world."
-- Albert Einstein ---------------------------------------------------------------------------