Re: Block HTML Control

From: Date: Tue, 02 Sep 2003 07:03:13 +0000
Subject: Re: Block HTML Control
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161424@lists.php.net to get a copy of this message
On Tuesday 02 September 2003 15:00, 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. <?php if ($doo): ?> <html>Lots of</html> <?php endif; ?> -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken */

« previous php.general (#161424) next »