After following, you can keep track of his dynamic information in a timely manner
$arr=['name'=>'peter','age'=>3,'ismarride'=>true]; foreach($arr as $key)
2017-08-030個贊
<?php class Staff { public $name; public $age; public $salary; public function __construct($name,$age,$salary=0) { $this->name=$name; $this->age=$age; $this->salary=$salary; } } $obj1 = new Staff('peter',20,4000); echo '我的姓名:'.$obj1->name,'我的年齡:'.$obj1->age,'我的工資是:'.$obj1->salary; echo '<hr>'; $objstr = serialize($obj1); echo '序列化的對象:'.$objstr;
2017-08-041個贊