Easy Tutorial
❮ Func Curl_Errno Pdo Query ❯

PHP is_array() Function

PHP Available Functions

The is_array() function is used to check if a variable is an array.

PHP Version Requirements: PHP 4, PHP 5, PHP 7

Syntax

bool is_array ( mixed $var )

Parameter Description:

Return Value

Returns TRUE if the variable is an array, otherwise returns FALSE.

Example

<?php
$arr_site = array('Google', 'tutorialpro', 'Facebook');
if(is_array($arr_site)){
    echo 'The variable $arr_site is an array';
} else {
    echo 'The variable $arr_site is not an array';
}
?>

Output:

The variable $arr_site is an array

PHP Available Functions

❮ Func Curl_Errno Pdo Query ❯