Try :
$data = filter_input(INPUT_POST, 'data', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
Links:
Related Contents:
- “Notice: Undefined variable”, “Notice: Undefined index”, “Warning: Undefined array key”, and “Notice: Undefined offset” using PHP
- How to add elements to an empty array in PHP?
- Multiple inputs with same name through POST in php
- php $_POST array empty upon form submission
- Create new variables from array keys in PHP
- How to cast variable to array
- PHP Multiple Checkbox Array
- Posting multidimensional array with PHP and CURL
- How create an array from the output of an array printed with print_r?
- What’s the best way to get the last element of an array without deleting it?
- Are arrays in PHP copied as value or as reference to new variables, and when passed to functions?
- PHP Pass variable to next page
- How to trim white spaces of array values in php
- Access first level keys with array_map() without calling `array_keys()`
- Array copy values to keys in PHP [duplicate]
- How to get the WordPress post thumbnail (featured image) URL?
- PHP Foreach Pass by Reference: Last Element Duplicating? (Bug?) [duplicate]
- How do you remove an array element in a foreach loop?
- PHP prepend associative array with literal keys?
- How do I create a comma-separated list from an array in PHP?
- Two arrays in foreach loop
- Submitting a multidimensional array via POST with php
- PHP combine two associative arrays into one array
- Save PHP array to MySQL?
- How to check if variable is array?… or something array-like
- Remove all elements from array that do not start with a certain string
- How to access first level keys of a 2d array with a foreach loop? [duplicate]
- Add a prefix to each item of a PHP array
- Return single column from a multi-dimensional array [duplicate]
- What does a PHP function return by default?
- Are PHP Associative Arrays ordered?
- PHP: Split string into array, like explode with no delimiter
- How to check if a specific value exists at a specific key in any subarray of a multidimensional array?
- Can you assign multiple variables at once in PHP like you can with Java?
- PHP variable interpolation vs concatenation [duplicate]
- Convert multidimensional array into single array [duplicate]
- Check if all values in array are the same
- Sort an array of associative arrays by column value
- PHP: Sort an array by the length of its values?
- Access PHP var from external javascript file
- How do I count occurrence of duplicate items in array [duplicate]
- glob() – sort array of files by last modified datetime stamp
- Check if request is GET or POST
- How to skip the 1st key in an array loop?
- Move an array element to a new index in PHP
- How to find array / dictionary value using key?
- Static variables in PHP
- Remove NULL, FALSE, and ” – but not 0 – from a PHP array
- PHP – If variable is not empty, echo some html code
- Delete element from multidimensional-array based on value