<?php
class test
{ var $t1,$t2
function test ($str1,$str2) { $this->t1 = $str1; $this->t2 = $str2; }
function m_echo() { echo $this->t1; echo "<br>"; echo $this->t2; } }
$mutest = new test("hello,world!"."hello,new oriental!");
$mytest->m_echo();
?>
是显示
hello,world<br>hellow,new oriental!
哎,不好说..
怎么书上,没介绍吗?
这其实就是 面向对象的 ...
仔细品味吧...