Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Ranga
onelife
post
Post #1





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 29.08.2013

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


Mam taki kod


Kod
        while ($dane = mysql_fetch_assoc($wynik))
        {
       $kill = '<b>Zabójstw:</b> '.$dane['kills'].'<br />';
       $death = '<b>Śmierci:</b> '.$dane['deaths'].'<br />';

      
        }

I potem to sobie wywołuje w szablonie {$kill} , ale nie wiem jak to zrobić

Kod
echo '<b>Ranga:</b>';
    if($dane['level'] != 0)
    {
    echo'<b>Admin</b><br />';
    }
    else {
    echo'<b>GRACZ</b><br />';
    }


Na ten sposób co mam wyżej żebym mógł wywołać w szablonie, bo jak dam w echo to mi poza styl wychodzi. Pomoże ktoś?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
com
post
Post #2





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


poco to
  1. eval("\$podstr = \"".$templates->get("o")."\";");

i co to ma robić?

Po pierwsze jak już:
http://us3.php.net/eval i patrz przykład
Po drugie
Cytat
Caution

The eval() language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged. If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user provided data into it without properly validating it beforehand.
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 28.12.2025 - 10:43