In my form i have fields with name photoid[] so that when sent they will automatically be in an array when php accesses them.
The script has been working fine for quite some time until a couple days ago. And as far as i can remember i havent changed any php settings in the ini file and havent changed the script at all.
when i try to retrieve the array using $_POST['photoid'] it returns a string with the contents ‘ARRAY’, but if i access it using $_REQUEST['photoid'] it returns it correctly as an array. Is there some php setting that would make this occur? As i said i dont remember changing any php settings lately to cause this but i might be mistaken, or is there something else i am missing.
Raise your
error_reportinglevel to find any potential source. It’s most likely that you are just using it wrong in your code. But it’s also possible that your $_POST array was mangled, but $_REQUEST left untouched.To determine if your $_POST array really just contains a string where you expected an array, execute following at the beginning of your script:
And following for a comparison:
Then verifiy that you are really using foreach on both arrays: