PHP reports – Functions and Logic – is_array – All

  • The is_array() function is used to find whether a variable is an array or not. The function returns TRUE if var is an array, FALSE otherwise

Syntax

is_array (var_name)

e.g.:        if (is_array($_POST[‘maintenance_type’]) == true) {

                                                      echo ‘ This is an array’;

                                    }