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
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to