Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Funkacja inna niż printf()
st4chu
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 21.12.2008

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


Czy istnieje komenda lub funkcja inna niż printf(). Chodzi mi o to że zamiast tych znaków "%i" wsadziła się jakaś wartość do danej wartości. w odpowiedniej kolejności jak teraz jest.
  1. $links = array(
  2. 'latesticon' => 'images/icons/ipb/%i.gif'
  3. 'boardlink' => 'index.php?page=Board&boardID=%f'
  4. 'topiclink' => 'index.php?page=Thread&threadID=%t#post%p'
  5. );
  6.  
  7. $icon = printf($links['latesticon'], $compare['icon']);
  8. $blink = printf($links['boardlink'], $compare['fid']);
  9. $tlink = printf($links['topiclink'], $compare['tid'], $compare['pid']);
  10.  
  11. $latesticon = '<img src="'.$icon.'" width="15" height="15" alt="" />';
  12. $boardlink = '<a href="'.$blink.'">'.$board.'</a>';
  13. $topiclink = '<a href="'.$tlink.'" onmouseover="showWMTT(\'latesttopics_'.$n.'\')" onmouseout="hideWMTT()">'.$topictitle.'</a>';
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: 23.08.2025 - 20:03