36 users online (0 members and 36 guests)  

Thread: php data order


  Results 1 to 2 of 2

Related

  1. What would you do in order to be famous?    Forum: General Discussion
    Replies: 6
  2. Replies: 3
  3. jmail /asp sort order    Forum: ASP Forum
    Replies: 0
  4. order by date    Forum: PHP Forum
    Replies: 10
  5. Page rendering order?    Forum: General Discussion
    Replies: 0
  1. #1
    pegboy's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Aug 2001
    Location
    Knoxville, TN
    Posts
    76

    php data order

    so, i'm working on an events calendar... you can insert one event at a time and it's apended to the flat file database. each event is on it's own line formatted as date (in this format 9.26.03), |, event, <br>... like this:

    date|event <br>

    right now i'm trying to figure out how to read each line and print them in order of date (closest date at the top, then in order to the bottom.)

    i'm sure i'll have a few other questions after i get this figured out... but thanks in advance for the help.
    robert koons

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya,

    Best bet would be to read the contents of the file into an array (command is file) and then use one of the various array functions to sort it before looping thru the array and displaying.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread