You are here: Array to hold multiple file content « PHP Programming Language « IT news, forums, messages
Array to hold multiple file content

Posted by Patrick on 09/19/06 14:58

Hi All,

I have numerous files that look like the chunk below. From the date and
time I calculate a year day value. For the example that value is
148.67721064815

I'm not an expert yet at dealing with arrays, but I get around well in
php otherwise (reading data files, loops, functions, etc).

My question is how would I go about creating an array that would hold
the year day as a key and the entire file contents in the next element?
Then when I advance to the next file do the same thing so that my ending
array would come out something like this;

[yearday file1][file1 contents]
[yearday file2][file2 contents]
[yearday file3][file3 contents]
....
...
..

Or is what I am wanting to do out of the question?

Appreciate your help.

Patrick

File example;

Descent 27.4279 -83.0965 05-29-06 16:15:11 55.052 26.52 0.95 35.28
Descent 27.4279 -83.0965 05-29-06 16:15:11 55.014 26.51 1.95 35.26
Descent 27.4279 -83.0965 05-29-06 16:15:11 55.047 26.50 3.04 35.29
Descent 27.4279 -83.0965 05-29-06 16:15:11 54.957 26.47 4.29 35.24
Descent 27.4279 -83.0965 05-29-06 16:15:11 54.947 26.45 5.33 35.25
Descent 27.4279 -83.0965 05-29-06 16:15:11 54.871 26.41 6.42 35.22
Descent 27.4279 -83.0965 05-29-06 16:15:11 54.875 26.36 7.52 35.25
Descent 27.4279 -83.0965 05-29-06 16:15:11 54.884 26.30 8.65 35.31
Descent 27.4279 -83.0965 05-29-06 16:15:11 54.887 26.24 9.78 35.35


--
Patrick A. Smith Assistant System Administrator
Ocean Circulation Group – USF - College of Marine Science
http://ocgweb.marine.usf.edu Phone: 727 553-3334

The trouble with doing something right the first time is that nobody
appreciates how difficult it was. - La Rochefoucauld

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация