PHP Web Developer.

กรกฎาคม 20, 2012

About array

Filed under: PHP — Prajak @ 1:31 pm

======= Code =======
<?php
$params = array(
‘A’ => 10,
‘B’ => 20,
‘C’ => 30,
‘D’ => 40,
‘E’ => 50,
‘F’ => 60,
‘G’ => 70
);

var_dump($params); exit;
}

======= Display =======
array
‘A’ => int 10
‘B’ => int 20
‘C’ => int 30
‘D’ => int 40
‘E’ => int 50
‘F’ => int 60
‘G’ => int 70

======= Code =======
<?php
$params = array(10, 20, 30, 40, 50, 60, 70);

var_dump($params); exit;
?>

======= Display =======
array
0 => int 10
1 => int 20
2 => int 30
3 => int 40
4 => int 50
5 => int 60
6 => int 70

« Newer Posts

สร้างเว็บไซต์หรือบล็อกฟรีที่ WordPress.com.