Hello !
I want to do something like
if (condition)
output this html-block
else
output that html-block
Without printig or echoing the html-block out (because the block has a
lot of , which I all would have to slash out...)
How can I do that ?
Martin
--
PHP General Mailing List
Ah, I forgott the {} ;-)
?php
if(strstr($HTTP_USER_AGENT,MSIE)) {
?
centerbYou are using Internet Explorer/b/center
?
} else {
?
centerbYou are not using Internet Explorer/b/center
?
}
?
Martin Thoma schrieb:
Hello !
I want to do something like
if (condition)
output this html-block
?php
if (condition)
{
?
HTML
?php
{
else
{
?
HTML
?php
}
?
-Stewart
-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 13:41
To: [EMAIL PROTECTED]
Subject: [PHP] if... then... else with HTML
Hello !
I want to do something like
if (condition
errors.
Or the html/php switiching way, a fraction slower after my tests :)
?if ($world != flat) {?
html
?} else {?
html
?]?
--
php developer / CoreTrek AS| I judge a religion as being good or bad
Sandnes / Rogaland / Norway| based on whether its adherents become
web: http
?
if (condition) {
?
1st HTML here
?
}
else {
?
2nd HTML here
?
}
?
-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 7:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] if... then... else with HTML
Hello !
I want to do something like
Something like this:
?php
if (condition)
{
?
output this html-block
?php
}
else
{
?
output that html-block
?php
}
?
Regards,
Avetis
Martin Thoma wrote:
Hello !
I want to do something like
if (condition)
output this html-block
else
output that html-block
Without
I hope I understood your question right.
You can do like this
?php
if () {
?
bhtml text/b
?php
else {
?
bother html/b
?php
}
?
-Ursprungligt meddelande-
Fran: Martin Thoma [mailto:[EMAIL PROTECTED]]
Skickat: den 23 april 2001 14:41
Till: [EMAIL PROTECTED]
Amne: [PHP
yes, consider this:
html
body
? if (isset($name)) { ?
your name is ?=$name?
? } else { ?
h1name is not set!/h1
? } ?
/body
/html
-elias
http://eassoft.cjb.net
Martin Thoma [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello !
I want to do something like
characters.
Original Message
On 4/23/01, 3:59:41 PM, elias [EMAIL PROTECTED] wrote
regarding Re: [PHP] if... then... else with HTML:
yes, consider this:
html
body
? if (isset($name)) { ?
your name is ?=$name?
? } else { ?
h1name is not set!/h1
? } ?
/body
/html
-elias
http
9 matches
Mail list logo