I want to make some changes on a php file. What does this statement mean?:
if(($aEbtVarSet["ebt_swift"] == '') || ($aEbtVarSet["ebt_swift"] != $_POST['sepabanktransfer_swift']))
$aEbtVarSet["ebt_swift"] = $_POST['sepabanktransfer_swift'];
I want to make some changes on a php file. What does this statement mean?:
if(($aEbtVarSet["ebt_swift"] == '') || ($aEbtVarSet["ebt_swift"] != $_POST['sepabanktransfer_swift']))
$aEbtVarSet["ebt_swift"] = $_POST['sepabanktransfer_swift'];
($aEbtVarSet["ebt_swift"] == '') || ($aEbtVarSet["ebt_swift"]
$a || $b Or TRUE if either $a or $b is TRUE.
($aEbtVarSet["ebt_swift"] != $_POST['sepabanktransfer_swift'])
! $a Not TRUE if $a is not TRUE.
If the variable $aEbtVarSet["ebt_swift"] is empty, or the POST input ebt_swift is different from its current value, it replaces the value with the POST input.
It basically means that if the $aEbtVarSet["ebt_swift"] variable is empty but set OR the same $aEbtVarSet["ebt_swift"] variable is different than the $_POST['sepabanktransfer_swift'] which is most likely set by a user with an <input> tag, then it will set the first variable to match the one sent by the user (replace/overwrite its previous value).