class.customer.php
来自「Professional PHP5 code for this book」· PHP 代码 · 共 24 行
PHP
24 行
<?php class Customer { public $id; public $customerNumber; public $name; public function __construct($customerID) { //fetch customer infomation from the database // //We're hard coding these values here, but in a real application //these values would come from a database $data = array(); $data['customerNumber'] = 1000000; $data['name'] = 'Jane Johnson'; //Assign the values from the database to this object $this->id = $customerID; $this->name = $data['name']; $this->customerNumber = $data['customerNumber']; } }?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?