How to create a filter for a multi-dimensional Mixed array

Asked

Viewed 120 times

1

I have in my POST complex variables with arrays inside other arrays and etc. Behold:

$filtro['esms_conta_id'] = 120;
$filtro['data_inicio'] = 2016-010-1;
$filtro['data_final'] = 2016-010-1;
$filtro['status']['accepted'] = true;
$filtro['status']['pending'] = true;
$filtro['status']['undeliverable'] = false;
$filtro['status']['delivered'] = false;
$filtro['status']['expired'] = true;
$filtro['status']['rejected'] = false;

need to make a very simple filter as in the function below.

public static function filter_post_feedback_controller() {
    $args = array(
        'flag_feedback'     => FILTER_FLAG_ENCODE_HIGH,
        'assunto'           => FILTER_FLAG_ENCODE_HIGH,
        'nome'              => FILTER_FLAG_ENCODE_HIGH,
        'email'             => FILTER_VALIDATE_EMAIL,
        'feedback'          => FILTER_FLAG_ENCODE_HIGH
    );

    return $args;

}
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.