Procedure for manipulating PHP associative arrays and indexed arrays

Source: Internet
Author: User
This time to bring you the operation of the PHP associative array and the index array steps in detail, the operation of the PHP associative array and indexed array of considerations, the following is the actual case, take a look.

Data

Username Password Test 123456

Associative arrays:

MYSQL_FETCH_ASSOC () Array ([username]=> ' test ',[password]=> ' 123456 ')

Indexed arrays:

Mysql_fetch_array () Array ([0]=> ' test ',[1]=> ' 123456 ')

Var_export ()

Array (0 = 1, 1 = ' a ', 2 = ' Hello ',)

Var_dump ()

Array (3) {[0]=> int (1) [1]=> string (1) "A" [2]=> string (5) "Hello"}

Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!

Recommended reading:

Bindparam and Bindvalue using step resolution in YII2

PHP Remove Array Single value method parsing

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.