Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoice Date - Sorting Expiring

Status
Not open for further replies.

Kate32

MIS
Jan 30, 2005
6
US
Any advice/assistance will be greatly appreciated: I am a .NET developer, but wanted to delve into PHP for my job and trying this project:

I want to create a php file that will read a text file and output via
the web. The text file has invoices for example in this form:
<Inv_Name>
<URL>
<Inv_Amt>
<Address>
<Inv_Date:>
------------------------
Here is an exmple of that file:
Staples
50.00
Place 123
01/24/2006

Fed Ex
100.00
Market 13
04/22/2005
...
---------------------
I would like my php file to populate table in HTML like so (assume
today's date is 12/02/2005):

+------------+--------------+-----------------+-----------------+
| Inv_Date | Inv_Name | Inv_Amt | Address |
+------------+--------------+-----------------+-----------------+
| 01/24/2006 | Staples | 50.00 | Place 123 |
+------------+--------------+-----------------+-----------------+
| 03/05/2006 | Microsoft | 1000.40 | Seattle |
+------------+--------------+-----------------+-----------------+
| 09/09/2005 | Wal-Mart | 300.50 | Arkansas |
+------------+--------------+-----------------+-----------------+
| 04/22/2005 | Fed Ex | 100.00 | Market 13 |
+------------+--------------+-----------------+-----------------+
Notice the ordering of the Invoice Dates (Inv_Date); records with
dates that have passed come below those of future Invoice dates. Where
the Invoice Name is located, the URL should up as an hyperlink which
is not shown in output.
 
Assuming that this file format stays perfect and no errors come up it should be easy using these functions.

fopen,fclose,fread,explode

Read up on these functions and you should be able to create your page in no time at all.
 
Thank you MattNeeley - I'll certainly follow through with your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top