1. Trang chủ
  2. » Công Nghệ Thông Tin

Một số hàm mang trong PHP pdf

8 872 1

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 8
Dung lượng 624,5 KB

Nội dung

           ă ê !"#$%#&#'()(*+, ,(/+(0( (1,2'3 !45#&#6+*(78-9,:; <2= $mang=array(1,3,6,2,"a","c","b"); sort($mang); print_r($mang); /*output: $mang=array (a, b, c, 1, 2, 3, 6)   ô a !>? ,(@A ,BC3 !45#&#9**9DE-/*,/78-9,AF8-9,?:; <2= $mang1=array(1,2,4,5,7); $mang2=array("a","b","c"); $mangth=array_merge($mang1, $mang2); print_r($mangth); /*output: $mangth=array(1,2,4,5,7,"a","b","c")  a ! &*9A ,+(G ,BC(HIJ(*<I@6>#' ()KLJ3 ! 45#&# 9**9DE6B/78-9,FIJ(*<(&F6>BMN,(&:; <2= $mang=array(1,2,4,5,6,"a","b","c"); $mang2=array_slice($mang,5, 3); print_r($mang2); /*output: $mang2=array(“a”, “b”, “c”)  ê !OP-(*96(Q(HR9-S  (#'()(*+, ,3 !O%(TU.(*.IVB@IJ(*<R9#'()L'U(LMN(W- (XD3 ,MNBH(*.IVY9B6/3 !45#&#9**9DE6/9*7,&(*J(W-F8 ,:; <2= $mang=array(1,2,4,5,6,"a","b","c"); $kq=array_search("b",$mang); echo $kq; /*output: $kq=6  ê - *.IV6>#'()(*+, ,3 - 45#&#+U(78-9,:; <2= $mang=array(1,2,4,5,6,"a","b","c"); $kq=count($mang); echo $kq; /*output: $kq=8;  - Z+H[\&,&(*J(*],9U3 4KBXD,&(*JL'U(%U^VU,&(*J(*],9U (*+, ,3 !45#&#9**9DEUTU/78-9,:; - <2= $a=array("a"=>"Cat","b"=>"Dog","c"=>"Cat"); print_r(array_unique($a)); /* Output: $a=array (“Cat”, “Dog”);  ---S  (+1  VU#'()I@+U> -S  ( ,^6_3 !45#&# 9**9DE#U678-9,F,&(*JAF,&(*J?F`F,& (*J:; <2= $mang = array(1,4,7,2); array_push($mang, 5); print_r($mang); /* Output: $mang=array (1,4,7,2,5); . ,BC3 !45#&#9**9DE-/*,/78-9,AF8-9,?:; <2= $mang1 =array(1,2,4,5,7); $mang2 =array("a","b","c"); $mangth=array_merge( $mang1 , $mang2 ); print_r($mangth); /*output: $mangth=array(1,2,4,5,7,"a","b","c") . 45#&# 9**9DE6B/78-9,FIJ(*<(&F6>BMN,(&:; <2= $mang= array(1,2,4,5,6,"a","b","c"); $mang2 =array_slice( $mang, 5, 3); print_r( $mang2 ); /*output: $mang2 =array(“a”, “b”, “c”) . ,(/+(0( (1,2'3 !45#&#6+*(78-9,:; <2= $mang= array(1,3,6,2,"a","c","b"); sort( $mang) ; print_r( $mang) ; /*output: $mang= array (a, b, c, 1, 2, 3, 6)   ô

Ngày đăng: 27/06/2014, 12:20

TỪ KHÓA LIÊN QUAN

w