PHP: <?php class HTMLbyArray{ private static $_instance = null; private $array; private function __construct() { $this->array = array(); } protected function __clone() { } public static function getInstance() { if(is_null(self::$_instance)){ self::$_instance = new self(); } return self::$_instance; } public function buildArray(){ $tmpArray = array($_POST['text'],$_POST['cells'],$_POST['align'],$_POST['valign'],$_POST['color'],$_POST['bgcolor']); /*if (sizeof($this->array == 1)){ $this->array = array($tmpArray); }else{ $this->array = array_push($this->array, $tmpArray) }*/ array_push($this->array, $tmpArray); print_r($this->array); } public function printArray(){ for ($i = 0; $i<sizeof($this->array); $i++){ echo "<form method = 'POST' action = 'index.php'> <tr>"; for($j = 0; $j<count($this->array[$i]);$j++){ echo "<td><input type='text' name='text' value = {$this->array[$i][$j]}></td>"; } echo "<td><button type='submit' name ='update'>Update</button></td> </tr> </form>"; } } } ?> У меня есть Singleton, в котором есть поле массив. Когда я с другой странички отправляю форму, я хочу дописывать в массив данные из $_POST в buildArray(), но ничего не происходит, ни с array_push, ни с созданием массива через array(), ни с array_merge(), либо чем-либо. Подскажите, как?