So, if I have a variable named $foo, then
if (!$foo && false)
wouldn't that work when $foo=false?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"crash" <crash@bcdcdigital.com> wrote in message
news:ehinef$289$1@forums.macromedia.com...
> If I'm understanding it, it looks like the DW program
wants to put in this
> code block and simply turn it on or off according to if
level is checked
> or not. While I can understand why you would want such a
feature as a
> programmer, to me the code block not being used seems
very strange an
> inefficient - ie, I can see how it would be easier to
program this way,
> but don't necessarily understand how the code could be
better this way
> (only see the possible need).
>
> Thanks for explanations,
>
> Jon
> "David Powers" <david@example.com> wrote in
message
> news:ehbj1f$jpf$1@forums.macromedia.com...
>> crash wrote:
>>> What's the advantage? In what instance would it
be useful?
>>
>> The Dreamweaver Log In User server behavior shows
how it's useful. It
>> offers the option of controlling access according to
access levels. If
>> you select the option to do so, Dreamweaver adds
&& true into the
>> conditional statement, so the code block is
executed. If you select the
>> option not to control access by access levels, it
inserts && false.
>>
>> The effect of inserting && false is that the
code block is always
>> ignored. As far as I can see, it's simply a
shorthand way of saying
>> "always ignore this block". Dreamweaver could have
created a different
>> Boolean, such as $checkAccessLevel and set it to
true or false. To my
>> mind, doing so would have been easier to understand,
but the result is
>> the same.
>>
>> --
>> David Powers
>> Adobe Community Expert
>> Author, "Foundation PHP for Dreamweaver 8" (friends
of ED)
>>
http://foundationphp.com/
>
>