piz
12-14-2002, 11:47 AM
Hi,
As far as I know its possible to define a function in another function.
Is this possible in Classes, too?
This Script returns following error:
Fatal error: Call to undefined function: getv() in F:\www.united-scripts.com\class_php.php on line 17
$test = new testclass(1);
echo $test->testarray[0];
class testclass
{
var $testarray = array();
function testclass($v)
{
$this->testarray[] = getv($v);
function getv($vv)
{
return $vv++;
}
}
}
Saludo, piz
As far as I know its possible to define a function in another function.
Is this possible in Classes, too?
This Script returns following error:
Fatal error: Call to undefined function: getv() in F:\www.united-scripts.com\class_php.php on line 17
$test = new testclass(1);
echo $test->testarray[0];
class testclass
{
var $testarray = array();
function testclass($v)
{
$this->testarray[] = getv($v);
function getv($vv)
{
return $vv++;
}
}
}
Saludo, piz