Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z Parserem....
keedy
post 12.02.2005, 20:56:33
Post #1





Grupa: Zarejestrowani
Postów: 52
Pomógł: 0
Dołączył: 18.12.2003
Skąd: Gliwice

Ostrzeżenie: (10%)
X----


mam taką funckje:

  1. <?php
  2.  
  3. public function display( $strFile ) {
  4. $resFile = fopen( $this->strTemplateDir . '/' . $strFile, 'r' );
  5. $strBuff = fread( $resFile, filesize( $this->strTemplateDir . '/' . $strFile ) );
  6. foreach( $this->arrVars as $strVar => $strValue ) {
  7. $strOutput = str_replace( $this->strBeginTag . '$' . $strVar . $this->strEndTag, $strValue, $strBuff );
  8. }
  9. echo $strOutput;
  10. }?>


Otóz jak widac zmienna $strOutput jest za kazdą petlą foreach jest nadpisywana, jak rozwiązac ten problem, aby zmienna nei byla nadpisywana?

Ten post edytował keedy 12.02.2005, 21:01:28


--------------------
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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 08:16