Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Problem z funkcją implode
Beziworld
post 3.03.2013, 09:09:08
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.03.2011
Skąd: Mucharz

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


No wiec mam problem z w.w funkcją. Może ktoś mi pomoże to ogarnąć bo ja już nie mam sił

Kod
    public function drawTranslationsTable()
    {
        $res = '<table class="text wideTable">
                        <tr class="legend">
                            <td>Nazwa</td>
                            <td class="sec">ID tłumaczenia</td>
                            <td class="thd">Języki strony</td>
                            <td>Funkcje</td>
                        </tr>';
                        
        $langs = Array();
        
        $tbls = $this->getTranslationsTables();
        foreach($tbls as $tbl)
        {
            $cols = "";
            $res .= '<tr class="content">
                        <td><strong>'.str_replace("_", "/", substr($tbl, 3)).'</strong></td>';
            
            $q = $this->__db->execute("SHOW COLUMNS IN $tbl");
            
            foreach($q as $key => $val)
            {
                if($val['Field'] != "id" && $val['Field'] != "lang")
                {
                    $cols .= $val['Field'].", ";
                }
            }
            
            $res .= "<td>".rtrim($cols, ", ")."</td>";
            $res .= "<td>".implode("&nbsp;", $this->getAvailableLangs($tbl))."</td>";
            $res .= '<td><input type="submit" value="Edycja" onclick="window.location.replace(\''.SERVER_ADDRESS.'administrator/management/translationEditor/'.$tbl.'\');" class="customBtn editBtn _m5" />
                         <input type="submit" value="Usuń" onclick="removeTranslation(\''.$tbl.'\');" class="customBtn removeBtn _m5" /></td>
                    </tr>';
        }

        $res .= "</table>";
        
        return $res;
    }


Zostaje wywalony błąd implode(): Invalid arguments

Ten post edytował Beziworld 3.03.2013, 09:10:10


--------------------
Beziworld.eu
Cmsstyle.pl
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
Posio
post 3.03.2013, 09:19:20
Post #2





Grupa: Zarejestrowani
Postów: 417
Pomógł: 44
Dołączył: 23.06.2011

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


rozumiem że po przeleceniu tego pętlą, $tbl to następna tablica tak ?
Go to the top of the page
+Quote Post
mortus
post 3.03.2013, 09:22:49
Post #3





Grupa: Zarejestrowani
Postów: 2 178
Pomógł: 596
Dołączył: 25.09.2009
Skąd: Piwniczna-Zdrój

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


Komunikat wyraźnie mówi, co jest nie tak. "&nbsp;" nie może być tym nieprawidłowym argumentem, zatem najprawdopodobniej tablica, którą ma zwrócić
$this->getAvailableLangs($tbl)
nie jest tablicą.
Go to the top of the page
+Quote Post

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: 18.07.2025 - 01:42