Hi Samuel,
Thanks for your reply. Yes, I have no case for an array since I don't really need to perform any changes on it, all I want is for it to be returned intact. I assumed it would jump to "default:" which is at the end, and return whatever it was passed.
The expected data type is passed to the "validate_types" function as a parameter for the switch cases.
If I comment out the call to the function, the script displays the category array. If I remove the comments I get this error:
Warning: Invalid argument supplied for foreach() in /home/amazingw/public_html/test.php on line 95
After this error, If I try:
print $REQUEST['category'][0]; I get "A"
print $REQUEST['category'][1]; I get "r"
print $REQUEST['category'][2]; I get "r"
print $REQUEST['category'][3]; I get "a"
print $_REQUEST['category'][4]; I get "y"
I don't want this returned. I want what was passed returned untouched.
I have also found if I take the "'category' => 'ARRAY'" out of the parameter for the function, the same error results.
Thanks,
Jacob