php conditionals?

php conditionals?

am 15.09.2010 05:48:35 von stao

Hi,

I saw php usage like below somewhere. I kind of wonder why the page does
not display anything. in my understanding, php only interprets what is
inside . Since the form is outside of any php tags, the form
should be displayed?

Thank you for any helps.





if (0)

{

?>












}

?>







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

RE: php conditionals?

am 15.09.2010 06:40:01 von Tommy Pham

> -----Original Message-----
> From: stao [mailto:stao@china4d.com]
> Sent: Tuesday, September 14, 2010 8:49 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] php conditionals?
>
> Hi,
>
> I saw php usage like below somewhere. I kind of wonder why the page
> does not display anything. in my understanding, php only interprets what
is
> inside . Since the form is outside of any php tags, the form
> should be displayed?
>
> Thank you for any helps.
>
>
>
>
> >
> if (0)
>

http://www.php.net/manual/en/language.types.boolean.php#lang uage.types.boole
an.casting
0 is interpreted as false. Thus the condition is not satisfied. The form
will never be shown.

Regards,
Tommy

> {
>
> ?>
>
>


>
>
>
>
>
>
>

>
>
> >
> }
>
> ?>
>
>
>
>
>


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

Re: php conditionals?

am 15.09.2010 07:14:03 von Jacob Kruger

The

tag is being rendered between the { and } tags inside PHP tags
related to the conditional statement, so if the conditional statement isn't
true, even static HTML inbetween them won't show up.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

----- Original Message -----
From: "stao"
To:
Sent: Wednesday, September 15, 2010 5:48 AM
Subject: [PHP-WIN] php conditionals?


> Hi,
>
> I saw php usage like below somewhere. I kind of wonder why the page does
> not display anything. in my understanding, php only interprets what is
> inside . Since the form is outside of any php tags, the form
> should be displayed?
>
> Thank you for any helps.
>
>
>
>
> >
> if (0)
>
> {
>
> ?>
>
>
>
>
>
>
>
>
>
>
>
> >
> }
>
> ?>
>
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 5451 (20100914) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5451 (20100914) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




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