But, when i want use a var in place of direct string, the function dont work correctly (do nothing)

Ex:

$arr_privilegios = array('field_name');...