model
<?php
include './bbcode/bbdecoder.php';
class Static_model {
function __construct() {
$sql="SELECT * FROM `ru_pages` WHERE `page`='".$GET['page']."'";
$result=$this->sql($sql);
$row=mysql_fetch_assoc($result);
}
function decode() {
$bb = new IRB_BBdecoder;
$text = !empty($row['text']) ? $row['text'] : NULL;
$check = $bb -> stripBBtags($text);
}
}
controller
<?php
include './models/static_model.php';
class About_controller extends Static_model {
public $return_text;
function createText() {
if(empty($check))
echo 'Нет текста';
else
$this->return_text=$bb -> createBBtags($text);
return $this->return_text;
}
}
include './template/php/about_t.php';
template
<div id="center_about">
<div id="center_about_wrapper">
<?php
echo $return_text."<a href='/achievements.php'>Наши достижения</a>";
?>
</div>
</div>
мне нужно вывести переменную $return_text. В модели я тащу инфу из базы и перекодирую с помощью ббдекодера. Пишет ошибку "неизвестная переменная return_text"