samedi 2 mars 2019

PHP : IF statement with combination of AND and multiple OR statement not working

Below is the part of my script. I am facing issues with the OR section. Its not working as expected. Using below one, script is only considering the first part of AND statement ($data['entry_type'] == 'Credit')

PHP part:

if (
($data['entry_type'] == 'Credit')   && 
( 
   ($data['credit_cat']     !=='Home' ) || ($data['select_account'] !=='Cash_Payment' ) )  
)   
{   $credit1 =  $credit1 + $data['amount']; }

Any suggestion to resolve the issue with OR part ?

Aucun commentaire:

Enregistrer un commentaire