国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

How to use a class to output a two-dimensional array?
哥特
哥特 2018-05-07 09:59:35
0
0
1308

<?php

class demo{

protected $name;

protected $age;

protected $wages;


public function __construct($name,$age,$wages){

$this->name = $name;

$this->age = $age;

$this->wages = $wages;


}

public function show(){

return "員工的姓名是:{$this->name} 年齡:{$this->age} 工資:{$this->wages}";

}

}


$obj = new demo('peter',24,5000);

echo $obj->show();

? ? echo '<br />';


$arr = array(array('name'=>'jike','age'=>18,'wages'=>'500'),

array('name'=>'jike','age'=>18,'wages'=>'500'),);

foreach ($arr as $key => $value) {

if(is_array($value)){

foreach ($value as $key => $v) {

echo $key.'-'.$v.'<br>';

}

}

}



?>


哥特
哥特

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template