Home > Backend Development > PHP Tutorial > 亲,帮忙给看看这个类哪里出有关问题了?出不来表格啊

亲,帮忙给看看这个类哪里出有关问题了?出不来表格啊

WBOY
Release: 2016-06-13 12:54:52
Original
823 people have browsed it

亲,帮忙给看看这个类哪里出问题了?出不来表格啊???
class Create{
  var $i;
  var $j;
  function table(){
  echo "

";
    if($a=1;$a   echo "";
  if($b=1;$b      echo "";
  }
 echo "";
}
echo "
$nbsp;
";
  }
}
$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();
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template