* Thus wrote Ford, Mike [LSS] ([EMAIL PROTECTED]): > On 26 November 2003 12:43, Jay Blanchard contributed these pearls of wisdom: > > > [snip] > > Well, so is there any online resource whereby I can read up on > > "FLAG" ???Or any idea how should I go about creating the > > memory location to store the binary-ish information (e.g. > > true/false, yes/no, 1/0)? Hope to get some help soon...thnx. > > [/snip] > > > > You're not likely to find something specific on FLAG, but > > maybe the following demonstration can help.... > > > > <?php > > > > if("blue" == $sky){ > > $niceWeatherFLAG = TRUE; > > } else { > > $niceWeatherFLAG = FALSE; > > } > > And a better way of writing that (more concise, more efficient) is: > > $niceWeatherFLAG = ("blue" == $sky);
that variable name has been bugging me (sorry jay :) Since a flag usually represents the answer to yes or no, I usually keep my variables names so they answer the question containing the flag: $is_nice_weather = ('blue' == $sky); $is_weekend = ($day != 'weekday'); $have_beer = (true != false); Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php