No. You can either echo/print with a heredoc (which is still echoing/printing, but is a lot easier) or you can exit PHP. For example:
<?php
switch($somevar){
case 'case1':
print <<< END
some html
some html
some html
END;
break;
case 'case2':
print <<< END
some html
some html
some html
END;
break;
}
?>


Or:
<?php
switch($somevar){
case 'case1':
?>
some html
some html
some html
<?php
break;
case 'case2':
?>
some html
some html
some html
<?php
break;
}
?>

CF High wrote:

Hey all.

Don't know if this is possible, but here goes:

I've got a simple switch statement that carries out one of several
operations based on the switch statement variable value.

Each operation has @ 50 lines of html -- do I have to echo or print all this
html!?

I'm new to PHP so pardon my ignorance here. I'm used to the relative ease
of Cold Fusion............

Thanks for any ideas/suggestions,

--Noah

--





--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




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

Reply via email to