Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][oo] Programowanie obiektowe z array
suryx
post
Post #1





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 14.07.2007

Ostrzeżenie: (0%)
-----


Witam , mam problem bo zle wysietla i glupie kompinuje ;/

index.php :
  1. <?php
  2. class theme{
  3.  
  4. function __construct(){ 
  5.  
  6. $a = array( 'lista' => $this->theme(menu));
  7. include 'theme.php';
  8.  
  9. }
  10. function theme($menu)
  11. {
  12. if($menu='menu')
  13. {
  14. echo 'BOMBA';
  15. }
  16. }
  17.  
  18. }
  19. new theme;
  20. ?>



theme.php
  1. <?php
  2. echo '<div style=\"background-color:#000;\">'.$a['lista'].'';
  3.  
  4. ?>


TERAZ WYGLADA : bomba <div></div> to zle ! mial byc to <div>bomba</div> .. pomoz </div style=\"background-color:#000;\">

Ten post edytował ayeo 25.04.2008, 12:55:43
Powód edycji: dodanie tagów
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 22:43