you could use the gettype() function or use var_dump() on the variable to hopefully shed some light on your question. i remember these types of questions only becoming clear for me by rigorous playing around with the variable type :)
On Wed, Apr 21, 2010 at 3:12 PM, Merrill Oveson <[email protected]> wrote: > I have the following code: > > function writePriv ($x) { > if ($y== 0) { > return TRUE; > } else { > return FALSE; > } > > } > > $writePriv = writePriv('w'); > if ($writePriv == FALSE) { print "false!!!"; } > print "<br /> write priv is $writePriv"; > > > The output is: > > false!!! > write priv is > > ______________ > When writePriv returns TRUE > the output is: > > write priv is 1. > > > My question: why when the function returns FALSE, don't I get a 0 (zero)? > > Thanks > > Merrill > > _______________________________________________ > > UPHPU mailing list > [email protected] > http://uphpu.org/mailman/listinfo/uphpu > IRC: #uphpu on irc.freenode.net > _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
