By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,053 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,053 IT Pros & Developers. It's quick & easy.

make a table with a text file

P: n/a
Hi,
i have a text file containing those lines (here is an extract)
-={P.A.G}=-Draven|669078528|668468420
-={P.A.G}=-Andy[UK]|676938876|676919330
-={P.A.G}=-Waffen_grenadier|680606921|669282384
the file contains much more lines.
this element | separate the differents parts

I would like to make a php that past the info in 3
1 should be the name (for example in the 1st line -={P.A.G}=-Draven)
1 should be the first num (for example in the 1st line 669078528)
the last should be the 2nd num (for example in the 1st line 668468420)

all that to create a table
(you can see what it should look like here www.pagclan.com/rankings)
(btw the numbers will be transformed into flash boxes)

thank you for your help...

--
**********************
SOCARA S.A.
Strasbourg
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
L'alsacien Strasbourg wrote:
Hi,
i have a text file containing those lines (here is an extract)
-={P.A.G}=-Draven|669078528|668468420
-={P.A.G}=-Andy[UK]|676938876|676919330
-={P.A.G}=-Waffen_grenadier|680606921|669282384
the file contains much more lines.
this element | separate the differents parts

I would like to make a php that past the info in 3


Use explode: <http://ch.php.net/explode>
Matthias

Jul 17 '05 #2

P: n/a
hmm..

http://us4.php.net/manual/en/function.split.php

<?php
foreach ($input as $line) {list($name, $number1, $number2) = split ("|",
trim($line));
?>?? Like that?
"L'alsacien Strasbourg" <contact(oter-ceci)@socara.net> wrote in message
news:bn**********@news-reader5.wanadoo.fr...
Hi,
i have a text file containing those lines (here is an extract)
-={P.A.G}=-Draven|669078528|668468420
-={P.A.G}=-Andy[UK]|676938876|676919330
-={P.A.G}=-Waffen_grenadier|680606921|669282384
the file contains much more lines.
this element | separate the differents parts

I would like to make a php that past the info in 3
1 should be the name (for example in the 1st line -={P.A.G}=-Draven)
1 should be the first num (for example in the 1st line 669078528)
the last should be the 2nd num (for example in the 1st line 668468420)

all that to create a table
(you can see what it should look like here www.pagclan.com/rankings)
(btw the numbers will be transformed into flash boxes)

thank you for your help...

--
**********************
SOCARA S.A.
Strasbourg

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.