Tech Reviews, Guides, Articles, and Forums for PC Hardware, Modding, and Gaming Enthusiasts
Fury-Tech Forums

Go Back   Fury-Tech Forums > Software Forums > Programming and Coding

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2004, 06:24 PM
sp0om's Avatar
Lesser Overmind
Lesser Overmind
 
Join Date: Feb 2004
Posts: 119
Rep Power: 5
sp0om is on a distinguished road
Default my first php effort (and a small question)

after learning how to write to text files and stuff using php, i made a really basic chat room. I then figured i could make myself a blog, and i tried it out. the blog itself is extremely basic, but i was able to fully utilize what i know about web deving (a bit of html, php, css, and a bit of flash too), which was a good exercise.

http://www.creativemods.com/blog/blog.php

Im pretty happy with the way it turned out, except the entries are in reverse order. I would like to have the newest entries on top, and the older ones on the bottom. is this possible when writing to text files??

TIA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-10-2004, 09:50 PM
Packetrat's Avatar
Greater Overmind
Greater Overmind
 
Join Date: Feb 2003
Location: Colorado
Posts: 887
Rep Power: 6
Packetrat is on a distinguished road
Default

Assuming that you've written each entry to a text file by ammending new entries to the end, the best way i figure it right off is by reading the strings into an array and then iterating through the array in reverse. You can even split each entry into different multidimensional array columns and sort by any of them. See any Data Structures programming tutorial for sort algorithms.
__________________
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. - Galileo Galilei

Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. - Thomas Jefferson (3rd US President, author of the Declaration of Independence)

Justice is the [ultimate goal] of government. It is the [ultimate goal] of civil society. It ever has been and ever will be pursued until it be obtained, or until liberty be lost in the pursuit. - James Madison (4th US President, "father" of the US Constitution)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Currently Viewing
Go Back   Fury-Tech Forums > Software Forums > Programming and Coding




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
help I NEED small caps!!! freshtokyo Programming and Coding 6 01-28-2004 09:43 PM
MY SMALL RANT !!!! PoisonBerry Jibber Jabber 3 11-20-2003 11:00 PM
FIC IC-VL67 Small Form Factor PC Tekime General Hardware 0 10-15-2003 10:25 AM
In California, Recall Effort Picks Up Steam Newsbot Jibber Jabber 0 06-12-2003 02:21 PM
Small calendar application for NT Tekime Operating Systems 0 02-13-2003 11:18 AM


All times are GMT -5. The time now is 09:44 PM.


PHP Scripts
BidVerve Directory
PageRank Script
SEO Scripts
37 SEO Scripts
List Cleaner Script
Keyword Cleaner
Directory Script
Directory Script

Directories
BidVerve Directory
BidVerve Directory
Nerve Directories
Nerve Directories
Directory Grow
Directory Grow

Our Supporters
entertainment sites
online casino

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 ©2007, Crawlability, Inc.