亲,帮忙给看看这个类哪里出问题了?出不来表格啊??? class Create{ var $i; var $j; function table(){ echo " "; if($a=1;$a echo ""; if($b=1;$b echo "$nbsp;"; } echo ""; } echo ""; } } $table=new Create(); $table->i=3; $table->j=4; $table->table(); ?> ------解决方案--------------------本帖最后由 xuzuning 于 2013-02-01 10:56:02 编辑 class Create{ var $i; var $j; function table(){ echo ""; for($a=1;$a$this->i;$a++){ echo ""; for($b=1;$b$this->j;$b++){ echo " "; } echo ""; } echo ""; } } $table=new Create(); $table->i=3; $table->j=4; $table->table();