Re: Assigns True but not false?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 06 December 2005 17:38, Gabe wrote:
> $this->m_arrQuesInfo[$this->m_itemID]['blnVacPromo'] = ( (
> !empty($_POST['vac_promo']) ) && ( $_POST['vac_promo'] == 'on' ) ) ?
> TRUE : FALSE;

I have a habit of casting true or false to boolean so that I'm sure they're 
not interpreted as 1 or 0.

Try this
$this->m_arrQuesInfo[$this->m_itemID]['blnVacPromo'] = ( (
 !empty($_POST['vac_promo']) ) && ( $_POST['vac_promo'] == 'on' ) ) ?
 (bool) true:(bool) false;

HTH

Andy

-- 
Now listening to Whigfield - Saturday Night on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--

Attachment: pgpoJ5TzmBkKB.pgp
Description: PGP signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux