Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Błąd W Klasie
Forum PHP.pl > Forum > Przedszkole
bela
  1. <?php
  2.  
  3. require_once(&#092;"../config.php\");
  4. require_once($absolutePath . &#092;"class/mysql.php\");
  5.  
  6. class modules {
  7. var $db;
  8. var $modules = array();
  9. var $in = 0;
  10.  
  11.  
  12. function modules() {
  13. $this->db = new mysql();
  14. }
  15.  
  16. function get_modules() {
  17. $this->db->query(&#092;"select * from modules order by place\");
  18. if($this->db->num_rows == 0) {
  19. print(&#092;"Brak modu?ów\");
  20. } else {
  21. while($row = $this->db->fetch_array()) {
  22. $this->modules[$this->in] = array( 1 => $row[0], 2 => $row[1], 3 => $row[2]);
  23. $this->in++;
  24. }
  25. }
  26. }
  27.  
  28. function build_menu() {
  29. for($a = 0; $a <= $this->in; $a++) {
  30. print(&#092;"<a href=\"index.php?id=\" . $this->modules[$a][1] . \"\">\" . $this->modules[$a][2] . \"</a><br />n\");
  31. }
  32. }
  33.  
  34. function return_module($id) {
  35. $this->db->query(&#092;"select * from modules where id='\". $id .\"'\");
  36. while($row = $this->db->fetch_array()) {
  37. return $row[3];
  38. }
  39. }
  40.  
  41.  
  42. function list() {
  43. $this->db->query(&#092;"select * from modules order by place\");
  44. if($this->db->num_rows == 0) {
  45. print(&#092;"Brak modu?ów\");
  46. } else {
  47. while($row = $this->db->fetch()) {
  48. print(&#092;"<tr><td>\".$row[0].\"</td><td>\".$row[1].\"</td><td>\".$row[2].\"</td><td>\".$row[3].\"</td></tr>\");
  49. }
  50. }
  51. }
  52. }
  53. ?>


pokazuje błąd w linijce 42 tam gdzie zaczyna się funkcja list()
Kod
Parse error: parse error, expecting `T_STRING' in /home/bela/public_html/bela/class/modules.php on line 42

może ktoś wie czemu?
Yarecki
Chyba chodzi o to http://www.php.net/manual/pl/function.list.php
bela
snitch.gif czemu tu nie ma pomógł mi, bym się pewnie z tym tydzień męczył smile.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.