Reputation: 181
I have this syntax here:
$savings = $savings == '' ? null : $savings;
$savings
comes from $_POST['savings']
which comes from an input number field and I left it empty, so it should be equal to '' but when I print_r($savings
) I get nothing, I was expecting null
.
Upvotes: 0
Views: 56