473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

make a table with a text file

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
2 2215
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Federico Moschini [328594] | last post by:
I have to make difference between2 data from a table in SQL. The page is made with Frontpage, and it extracts QtaGiaCons and Quantita from table "oclrighe". I have to make Quantita -...
2
by: jaydog | last post by:
Hello... I'm new to XSL, and I've written a XSLT file that converts a XML file to HTML format. When viewed in a browser, it appears exactly as I would like. However, if I want to look at the...
1
by: Danny | last post by:
I have a 90 by 40 graphic. I would like to make this a background in my table so this nice backround will cover the whole table like painting it etc. no matter how big or small I make it. Right...
4
by: Peter Scott | last post by:
I created a table that has a column in that needs to contain a full Unix file path. Since 2048 was too long for a VARCHAR, I made it TEXT. I since populated the table. Now I want to make the...
2
by: Robert | last post by:
Hello, I'm trying to collect some data from one page, which have to be mixed up neatly. This is the aim: I collect the category names from a table in the database (tblCategorie). The...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
8
by: ghadley_00 | last post by:
Hi, I have an access database with a table linked to an external text file. Occasionally the location of the database and the text file change (but are always in the same directory). Is there a...
10
by: Extremest | last post by:
I know there are ways to make this a lot faster. Any newsreader does this in seconds. I don't know how they do it and I am very new to c#. If anyone knows a faster way please let me know. All...
1
by: xahlee | last post by:
Elisp Tutorial: Make Google Earth Xah Lee, 2006-12 This page shows a example of writing a emacs lisp function that creates a Google Earth file, and creates a link to the file, as well a link...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.