You do realize that you don't need a semicolon right after <?php tags,
correct? 

-Dan

On Tue, 2003-09-02 at 04:59, Viraj Kalinga Abayarathna wrote:
> Seth,
> try to mingle PHP and HTML.. that means escape the PHP and jump to HTML
> when 
> you want the HTML.. like this...
> 
> 
> <?php
>  if (!$var) {
>         ?>    <lots>
>                  <of>
>                  <html>
>       <?php
>          ;
>  } else {
>          ?>   <lots>
>                  <of>
>                  <html>
>          <?php ;
>  }
> ?>
> 
> 
> happy coding
> 
> Viraj
> 
> 
> 
> 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
> > ------------------------------------------------------------------------
> > ---
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

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

Reply via email to