Current location: Hot Scripts Forums » Programming Languages » PHP » Ordering Serialize Arrays


Ordering Serialize Arrays

Reply
  #1 (permalink)  
Old 12-18-04, 11:38 PM
Chad's Avatar
Chad Chad is offline
Newbie Coder
 
Join Date: Dec 2004
Location: Urth?
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Ordering Serialize Arrays

I think I better explain before I ask...
I'll try to explain the best I can.

I am working on a program called Gateway.
Its a CMS program and has menus, obviously.

The menus, stored in MySQL, have a column to order them by called menu_order.

I store the menus and their items in a serialized array that is also stored in the database to reduce the amount of queries.

When the program inserts the menus into the array, it displays the menus in the order in which they come out of the array.

So if I modify the ordering from the menus table, the serialized array would modify the order.

However, the order in which the menu stays the way it is in the array.
Basically, the displaying of the menus is not ordered by the "menu_order" id.

My question is, how can I order the array to display according to the "menu_order" id?

Will array_sort do this?

I think that is all...

Thank you
__________________
[ DeoX Designs ]
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Deal With Parenthesis' in Arrays? cebuy PHP 0 11-27-04 02:46 PM
Arrays cebuy PHP 1 10-25-04 07:40 AM
Need help with arrays wiseone PHP 1 10-13-04 03:58 AM
Serializing a set of arrays dannyallen PHP 2 10-11-04 03:04 AM
Arrays Greigorama Windows .NET Programming 3 06-17-04 05:13 AM


All times are GMT -5. The time now is 05:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.