if ($temp2 !== false) { // вытяги и записывая каждую title в массив $artilces $articles[] = $temp2['title']; } } while ($temp2 !== false); return $this->array_temp = $articles; } public function read_from_db_specific_article($a) { $temp = mysql_query("SELECT * FROM test WHERE title='" . $a . "'"); $temp2 = mysql_fetch_assoc($temp); // шагаем по дискриптору if ($temp2 !== false) { // вытяги и записывая каждую title в массив $artilces $article = $temp2; return $this->array_spec_article_temp = $article; } return $this->array_spec_article_temp = false; } } $test = new Database('localhost', 'root', 'root', 'ml2_hw'); $test->article_title = 'Latvia in EU'; $test->article_content = 'Latvia joins to the EU in 2007 so you can...'; $test->read_from_db(); //var_dump($test); echo '<br/><br/><br/><br/>'; //2nd task abstract class Articles { } //Library functions