you can try if( $var) require("1.html"); else require("2.html");
Seth Willits wrote:
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
------------------------------------------------------------------------ ---
--
Raditha Dissanayake
http://www.radinks.com/sftp/?sg
Lean and mean secure FTP applet in pure java.
Complete with Graphical User Inteface Just 150 kb in size.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php