文档介绍:PHP
Author:
Author:
(Andych) E-mail:******@ PHP
,PHP
PHP
,PHP
php
1,php
,
,
,
,
1)
$ 2)
$
3)
4)
$example , $sut_name , $stu_name_2 2,
$stu_name; $stu_name,$stu_age; PHP
,PHP
3,
,
true true
isset()
,
true
false
$stu = array("james","jack","Toms")
0
$stu = array(2
=>"james","jack","Toms")
2
PHP $arr = array
["name"=>"james","sex"=>"boy"]
1
,unset()
unset($arr)
unset($arr[0])
PHP 2
,foreach()
foreach($arr as
$value)
foreach($arr as
$key=>$value)
PHP each
()
/
4
0,1,key
value , , 4,
,
:$arr = array(4
=>"Test define("",
)
user","Toms","Andych");
$foo = each
($arr); defined()
,
,
true
print_r($foo); false
While
:
: PHP
,PHP
While(
)
Array ( [1] =>
Test user [value] => Test user [0]
{ => 4 [key] => 4 )
(boolean) 1)
(boolean)
;
; PHP 2)
}
list()
3)
,PHP
:list($var) = $arr 4)
for
:
:list
0
5)
for(
1;
2;
3)
6)
{ current()
7)
;
;
:current($arr)
8)
} PHP
,PHP
,PHP
PHP
next()
break
continue
:next
($arr) break
prev()
:prev($arr) continue
,
range()
/
/
,
:range
(0,40) PHP
PHP Author:
(Andych)
count()
E-mail:******@
:count($arr) PHP
:
?
1:
2
:
?
:
array_count_values()
$c = $a>$b ? "good":"bad"
:
,
,
PHP
PHP
:
:
Author:
(Andych)
:
"
:$stu[1] = "
" E-