I'm studying php, I got a code to tinker and I'm not finding reference to the question mark in php, which is in the example below, for what it is.
$dinheiro = $debito <= 1 ? FALSE : TRUE;
I'm studying php, I got a code to tinker and I'm not finding reference to the question mark in php, which is in the example below, for what it is.
$dinheiro = $debito <= 1 ? FALSE : TRUE;
It's called Ternary Operator.
This means that if the value of $ debit is less than or equal to one, the variable $ money is FALSE, otherwise it is set to True.
This can be compared to:
if($debito<=1)
{
$dinheiro = false;
}
else
{
$dinheiro = true;
}