Blogger Information
Blog 250
fans 3
comment 0
visits 321541
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数组:关于数组的增删改查
梁凯达的博客
Original
1427 people have browsed it

<?php

//数组的增删除改查;

//声明一个数组

$arr = array(

'a'=>1,

'b'=>2,

'c'=>3,

'd'=>4,

'e'=>5

);

var_dump($arr);

//增的办法:$arr[f]='6',代码自上而下的走.

$arr['f']=6;

var_dump($arr);

//删的办法:unset($arr[f]);

unset($arr['a']);

var_dump($arr);

//改的办法:$arr['f']=3;

$arr['f']=3;

var_dump($arr);

//查的办法:var_dump($arr['a'])

var_dump($arr['b']);


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post