Search for all Array values in another Array
Posted: Sun Apr 10, 2005 7:41 am
I want to make sure $_POST['a'], $_POST['b'] and $_POST['c'] exist.
I need a function to return 3. I thought this would but doesnt :
in_array(array('a','b','c'),array_keys($_POST)) is always returning false even when $_POST['a'], $_POST['b'] and $_POST['c'] exist.
Any other way ?
Thanks
I need a function to return 3. I thought this would but doesnt :
Code: Select all
echo array_search(array('a','b','c'),array_keys($_POST));Any other way ?
Thanks