<?php
demo kelas{
dilindungi $nama;
dilindungi $umur;
dilindungi $upah;
fungsi awam __bina($nama,$umur,$upah) ini->nama = $nama;
$ini->umur = $umur;
$ini->upah = $upah;
}
pertunjukan majlis awam(){
"员工的姓名是:{$ini->nama} 年龄:{$ini->umur} 工资:{$ini->upah}";
}
}
}
}
demo baharu('peter',24,5000);
echo $obj->show();
echo '<br />';
$arr = array('name '=>'jike','age'=>18,'upah'=>'500'),
array('name'=>'jike','age'=>18,' upah'=>'500'),);
foreach ($arr as $key => $value) {
if(is_array($value)){
foreach ($value as $key => ; $v) {
echo $key.'-'.$v.'<br>';
}
}
}