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!?
You could put your HTML into a separate file and just include() it
wherever you
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:
?
h1Hello/h1
?php
break;
}
?
johannes
--
PHP General Mailing List (http://www.php.net/)
To
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;
}
?
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
: John W. Holmes [EMAIL PROTECTED]
To: 'CF High' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, January 25, 2003 8:42 AM
Subject: RE: [PHP] Switch statement || How to output html without using
echo() or print()
I've got a simple switch statement that carries out one of several
operations
Thanks for the informative response, Leif.
Looks like you and Johannes are on the same page -- these solutions save a
great deal of time.
Thanks,
--Noah
Leif K-Brooks [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
No. You can either echo/print with a heredoc
6 matches
Mail list logo