Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] tablica, jak ją includować
-Guest-
post
Post #1





Goście







w pliku dane.dat mam przykładowo:
Kod
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona1 | Opis1 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona2 | Opis2 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona3 | Opis3 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona4 | Opis4 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona5 | Opis5 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona6 | Opis6 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona7 | Opis7 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona8 | Opis8 | <img src="2.gif">
<img src="1.gif"> | &nbsp;&raquo;&nbsp; | Strona9 | Opis9 | <img src="2.gif">

jak to includować do linki.php aby z tego otrzymac np:
Kod
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
<img src="1.gif">&nbsp;&raquo;&nbsp;<a href="http://www.mp.pl/" target="_blank">Medycyna Praktyczna</a>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Master Miko
post
Post #2





Grupa: Zarejestrowani
Postów: 530
Pomógł: 0
Dołączył: 15.01.2005
Skąd: Warszawa

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


1. Używasz systemu plików aby wczytać plik: fopen" title="Zobacz w manualu php" target="_manual a potem użyć function.fgets.php" title="Zobacz w manualu php" target="_manual
2. W pętli używasz funkcji explode, aby stworzyć tablicę na postawie oddzielacza " | " poczytaj: http://forum.php.pl/index.php?showtopic=45876&hl=explode

Proste... tylko w pliku dane.dat polecam Ci pozbyć się spacji pomiędzy danymi a | lub użyć spacera " | ".

Było wielokrotnie na forum leniu (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Ten post edytował Master Miko 7.05.2006, 12:40:20
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: 2.10.2025 - 22:36