User gives me a $_POST, I want to check whether keys (not the values) are there.
$_POST keys need to be newemail, firstPassword and secondPassword.

What I have tried:
if (in_array(array_keys($_POST), array("newemail", "firstPassword", "secondPassword"))) echo "Everything in order"..

How to make it actually work?

The result of the intersect of both arrays, should be an array identical to array("newemail", "firstPassword", "secondPassword")

So, if you do an array_diff() on those two next, you should have an empty array.

Hope it makes sense.

It's so hard, yet so easy. Exactly that. Thanks.