cordoprod Posted August 16, 2007 Share Posted August 16, 2007 Hello.. I need som help sorting news alphabetically. I use the explode function to get the contents. And the while() function. Basically, I explode the "|" sign and I want to be able to sort any "|" row alphabetically. Somebody have a clue ?? Quote Link to comment https://forums.phpfreaks.com/topic/65215-solved-sorting-news-alphabetically-flat-file/ Share on other sites More sharing options...
zq29 Posted August 16, 2007 Share Posted August 16, 2007 Moved to PHP help. I think you'll need to provide a bit more information about your flatfile... Quote Link to comment https://forums.phpfreaks.com/topic/65215-solved-sorting-news-alphabetically-flat-file/#findComment-325749 Share on other sites More sharing options...
ToonMariner Posted August 16, 2007 Share Posted August 16, 2007 I woudl advise that generate a 2d array for the articles as you loop through the file. Then use array_multisort on the resulting array to order it by the fields you want. Quote Link to comment https://forums.phpfreaks.com/topic/65215-solved-sorting-news-alphabetically-flat-file/#findComment-325751 Share on other sites More sharing options...
cordoprod Posted August 16, 2007 Author Share Posted August 16, 2007 Solved it myself Quote Link to comment https://forums.phpfreaks.com/topic/65215-solved-sorting-news-alphabetically-flat-file/#findComment-325756 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.