如果这样呢
class align
{
$s=array[1,2,3];
function a($b)
{
$this-> s[$b];
}
function b()
{
$out = $this->s[]."\r\n";
}
}
这样也对吗?
class align
{
$s=array[1,2,3];
function a($b)
{
$this-> s[$b];
}
function b()
{
$out = $this->s[]."\r\n";
}
}
这样也对吗?
另外第二行错了 array(1,2,3)
{
$s=array[];
function a($b)
{
$this-> s[$b];
}
function b()
{
$out = $this->s[]."\r\n";
}
}
这样可以吗?
{
var $s=array(0,1,2,3);
var $i=0;
function a($key,$value)
{
$this-> s[$key]=$value;
}
function b($key)
{
echo $this->s[$key]."\r\n";
}
}
$test= new align ;
$test->a(1,'a');
$test->b(1);