RE: php conditionals?

"Tommy Pham" <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
> -----Original Message-----
> From: stao [mailto:[email protected]]
> Sent: Tuesday, September 14, 2010 8:49 PM
> To: [email protected]
> 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 <?php> <?>.  Since the form is outside of any php tags, the form
> should be displayed?
> 
> Thank you for any helps.
> <html>
> 
> <body>
> 
> <?php
> 
> if (0)
> 

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

Regards,
Tommy

> {
> 
> ?>
> 
> <form action="test.php" method="post">
> 
> <input type="text" name="name">
> 
> <input type="submit" name="submit" value="EnterYourName">
> 
> 
> </form>
> 
> 
> <?php
> 
> }
> 
> ?>
> 
> </body>
> 
> </html>
> 


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.