Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] podstawianie zmiennej, pod link
-Gość_andi_*-
post
Post #1





Goście







witam (IMG:http://forum.php.pl/style_emoticons/default/dry.gif) mam male, glupie pytanie... jezeli otrzymuje z formularza dane tzn np. numer gg: 123456 i jest on przypisany pod zmienna $gadu to jak zrobic, aby podstawic ta zmienna do linka aby wyszedl link
echo '<A href="gg:'$gadu'">ble ble ble</A>'; (?) tzn "gg:123456" ( echo '<A href="gg:123456">ble ble ble</A>';
(IMG:http://forum.php.pl/style_emoticons/default/blinksmiley.gif) pomocy
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




a widzisz, nie zalapales idei jaka podal ci NuLL. On mial na mysli juz nie stosowanie echo:
  1. <?
  2. //jakis kod php
  3. $file = file("baza.txt");
  4. foreach($file as $value) {
  5. $exp = explode("`",$value);
  6. echo $exp[0]." ".$exp[1]." ".$exp[2]." ".$exp[3]." ".$exp[4]."<br />".$exp[5]."<hr />";
  7. } 
  8. ?>
  9. <table border="1" width="490" cellspacing="0" cellpadding="0">
  10. <tr>
  11. <td colspan="2">'.$exp[0].'</td>
  12. <td width="199">
  13. <p align="right">'.$exp[4].'</td>
  14. </tr>
  15. <tr>
  16. <td width="124">
  17. <p align="center">
  18. <a href='gg:<?php echo $exp[3]; ?>'><img border="0" src="page/50/graffika/gadu.gif" width="32" height="32"></A>;
  19. </td>
  20. <td colspan="2">
  21. <p align="center">'.$exp[5].'</td>
  22. </tr>
  23. <tr>
  24. <td width="124">&nbsp;</td>
  25. <td width="167">&nbsp;</td>
  26. <td width="199">
  27. <p align="right">ip</td>
  28. </tr>
  29. </table>
  30. <?
  31. //reszta kodu php
  32. ?>

pozatym jakbys luknal do linka co ci na poczatku dawalem to bys wiedzial ze twoja konstrukcja jest zla
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: 11.10.2025 - 13:48