pavel.dolinin
Новичок
Каким образом я получаю в денном коде Undefined ???
результат:
Notice: Undefined index: A in C:\Program Files\EasyPHP 2.0\www\TestSites\php\index.php on line 21
A Object ( => Array ( => B ) )
вопрос:
почему? если кто знает объясните плизззз...
PHP:
<?php
class A {
var $b = Array();
function A() {
$this->setB();
}
function set() {
$this->setA();
$this->setB();
$this->ptintB();
}
function setA() {
$this->b["A"] = "A";
}
function setB() {
echo "<br />";
print_r($this->b["A"]);
$this->b["B"] = "B";
}
function ptintB() {
print_r($this->b);
echo "<br />";
}
}
$a = new A();
print_r($a);
?>
Notice: Undefined index: A in C:\Program Files\EasyPHP 2.0\www\TestSites\php\index.php on line 21
A Object ( => Array ( => B ) )
вопрос:
почему? если кто знает объясните плизззз...