php - missing array $_POST when used $_POST = array_map('trim', $_POST); -


i have check box named check_user_id[] like:

<input type="checkbox" value="87" name="check_user_id[]" class="waiting_user"> <input type="checkbox" value="88" name="check_user_id[]" class="waiting_user"> <input type="checkbox" value="89" name="check_user_id[]" class="waiting_user"> 

before page load use trim

$_post    = array_map('trim', $_post); 

all valus getting not $_post['check_user_id'] value directly on variable name $check_user_id b'coz register_globals on want value in $_post['check_user_id']

any way ?

trim function works on strings.

$_post array , can contain strings , arrays.

if want trim strings in multidimensional array, should use or write recursive function.

or perform trimming manually on each element of array:

foreach($_post['check_user_id'] &$check){   $check = trim($check) ; } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -