| Код | class notice { var $noticeGood; var $noticeBad; function setNotice($text,$type){ if ($type = 'good') { $this->noticeGood[] = $text; } else { $self->noticeBad[] = $text; } } function getNotice($type){ if ($type = 'good') { return $this->noticeGood; } else { return $this>noticeBad; } }
|
Подключаем:
| Код | $notices = new notice; |
Используем: Записываем:notice::
| Код | SetNotice('Успешно','good'); |
Вытаскиваем:
| Код | echo notice::getNotice('good'); |
Выдает NULL или не работает. Мне нужно работать с этими переменными в пределах приложения. }
|