php - Variable in $_POST returns as string instead of array -


in form have fields name photoid[] when sent automatically in array when php accesses them.

the script has been working fine quite time until couple days ago. , far can remember havent changed php settings in ini file , havent changed script @ all.

when try retrieve array using $_post['photoid'] returns string contents 'array', if access using $_request['photoid'] returns correctly array. there php setting make occur? said dont remember changing php settings lately cause might mistaken, or there else missing.

raise error_reporting level find potential source. it's using wrong in code. it's possible $_post array mangled, $_request left untouched.

// example escaping feature might bork $_post = array_map("htmlentities", $_post); // case looks "strtoupper" 

to determine if $_post array contains string expected array, execute following @ beginning of script:

var_dump($_post); 

and following comparison:

var_dump(array_diff($_request, $_post)); 

then verifiy using foreach on both arrays:

foreach ($_post["photoid"] $id) { print $id; } 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -