<?php private $query; private $result; public $row; public function MysqlFetchAssoc($db_query, $name) { $this -> row[] = $this -> result; } $$name = $this -> row; return $$name; } } ?>
a wywołuj go tak (tylko przykład)
<?php foreach ($mysql -> $$name as $a){ } ?>
i nie działa :| pokazuje mi trzy błędy
Cytat
Notice: Undefined variable: name in /home/lee/public_html/cms/index.php on line 8
Notice: Undefined variable: in /home/lee/public_html/cms/index.php on line 8
Fatal error: Cannot access empty property in /home/lee/public_html/cms/index.php on line 8
Notice: Undefined variable: in /home/lee/public_html/cms/index.php on line 8
Fatal error: Cannot access empty property in /home/lee/public_html/cms/index.php on line 8
8 linia to dokładnie ta z foreach($mysql -> $$name as $a){