Home > Backend Development > PHP Tutorial > One of php array learning

One of php array learning

巴扎黑
Release: 2016-11-22 09:59:19
Original
1367 people have browsed it

php array learning
Array: a collection of keywords and values. The same php array can store values ​​of multiple different data types. The array subscript starts from zero
Several ways to create an array:
(1)

Php code

$arr[0]=1;//Array element

$arr[1]=2.8;

......


(2)

Php code

$arr = array(1, 2.8,"str",....);


(3)

Php code

//You can specify the subscript of the array element yourself

$arr = array("dizhi"=>"beijing ",..)//Use array("key"=>"value")


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template