PHP-array
Apr 13, 2018 am 09:17 AMThis article introduces some knowledge about PHP arrays. Now I share it with you. Friends in need can refer to it
There are three ways to create index arrays:
$fruit=array("香蕉"); $fruit=array();$fruit[0]="香蕉"; $fruit=array('0'=>'香蕉');
Access index array:
$fruit=array("苹果","香蕉"); foreach($fruit as $key=>$value){ echo ...}
Creation of associative array:
$fruit = array('apple'=>'苹果','banana'=>'香蕉'); foreach ($fruit as $key=>$value){echo...}
Related recommendations:
How to deal with PHP array problems
Detailed explanation of the use of PHP array access interface ArrayAccess
Several methods of converting mysql query results into PHP arrays
The above is the detailed content of PHP-array. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How To Set Up Visual Studio Code (VS Code) for PHP Development
