PHPis_array () check whether the variable is an array implementation method. is_array array _ PHP Tutorial

Source: Internet
Author: User
PHPis_array () checks whether the variable is an array implementation method, is_array array. PHPis_array () is used to check whether the variable is an array. the is_array array is_array () PHPis_array () function is used to check whether the variable is an array. This function is especially used for PHP is_array () security () check whether the variable is an array implementation method, is_array array

Is_array ()

The PHP is_array () function is used to check whether a variable is an array. This function is especially used for security checks (such as form or SESSION checks ).

Syntax:

Bool is_array (mixed var) returns TRUE if var is array; otherwise, FALSE.

Example:

<? Php $ arr_age = array (18, 20, 25); if (is_array ($ arr_age) {echo 'variable $ arr_age is an array ';} else {echo 'variable $ arr_age is not an array';}?>

Run the sample output:

The variable $ arr_age is an array.

The above PHP is_array () check whether the variable is an array implementation method is all the content that I have shared with you. I hope to give you a reference and hope you can provide more support to the customer's house.

Http://www.bkjia.com/PHPjc/1136650.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1136650.htmlTechArticlePHP is_array () checks whether the variable is an array of implementation method, is_array array is_array () PHP is_array () function is used to detect whether the variable is an array, this function is especially used for some security...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.