Reputation: 14559
I'm having a problem with arrays:
print_r($_POST['bank']);
produces Array ( ['deposit'] => 30 )
However,
assert($_POST['bank']['deposit'] == 30);
which immediately follows print_r
, fails. Since nothing is changing the value of $_POST
, I suppose my syntax is wrong, but I can't see it for the life of me.
Upvotes: 1
Views: 93
Reputation: 14559
Ugh, I just realized it.
assert($_POST['bank']['\'deposit\'']==30);
works fine, because "deposit" had had extra single quotes around it.
Upvotes: 2