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