RE: [PHP] FLAG

From: Date: Wed, 26 Nov 2003 13:14:43 +0000
Subject: RE: [PHP] FLAG
Groups: php.general 
Request: Send a blank email to php-general+get-171048@lists.php.net to get a copy of this message
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); Cheers! Mike -- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#171048) next »