PHP is_array(value) function

Description

is_array(value) returns true if value is an array.

Syntax

PHP is_array(value) function has the following syntax.

is_array(value)

Parameter

  • value is the variable being type checked.

Return

is_array(value) returns true if value is an array.

Example

Is it an array?


<?php/*from  w w  w.  j av a2s.  c o m*/
$values = array(2, "2", 2.5, "2.5", null, true);

var_dump(is_array($values));


?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions