That does the trick, although I'm not exactly sure why.

Shouldn't the html between the <?php case 1: ?> and <?php break; }: ?>
statements be executed regardless of whether or not case 1 matches the
switch variable?

In Cold Fusion anything outside of <cfoutput>cf code here</cfoutput> is
ignored by the CF language processor; thus the <?php case 1?> html here
<?php break; }?> would display the html for each case.

In any case thanks for workaround -- I would have echoed out all the html
otherwise..........

--Noah

----- Original Message -----
From: "Johannes Schlueter" <[EMAIL PROTECTED]>
To: "CF High" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 25, 2003 8:38 AM
Subject: Re: [PHP] Switch statement || How to output html without using
echo() or print()


> On Saturday 25 January 2003 20:38, CF High wrote:
>
> > Each operation has @ 50 lines of html -- do I have to echo or print all
> > this html!?
>
> Try something like
> <?php
>   switch ($foo) {
>     case 1:
> ?>
> <h1>Hello</h1>
> <?php
>       break;
>   }
> ?>
>
> johannes
>


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

Reply via email to