Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7490337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:35:05+00:00 2026-05-29T15:35:05+00:00

How can switch the order this outputs the list items. I have my custom

  • 0

How can switch the order this outputs the list items. I have my custom field values set to “001,value” “002,value” but the lowest number comes out last in the list and I need it first.

 <?php
     $album = get_post_meta($post->ID, "album", false);
     $album_list = get_post_meta($post->ID, "album_list", false); 
     foreach ($album_list as $album_list) {
         list($key, $value) = explode(',',$album_list);
         $indexed_album_list[$key] = $value;
     }
     foreach ( $album as $each_album) {
         list($key,$album) = explode(',',$each_album);
         echo '<div>'.$album.'</div>';
         echo '<div>';
         if ($album_list = $indexed_album_list[$key]) {
             echo $album_list;
         }  
         else {
             echo '&nbsp';
         }
         echo '</div>';
     }
?>   

Heres the returend data…Array ( [0] => 002,Curtis [1] => 001,Get Rich Or Die Tryin [2] => 003,The Massacre [3] => 004,Before I Self Destruct ) Array ( [0] => 001, [1] => 002, [2] => 003, [3] => 004,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:35:06+00:00Added an answer on May 29, 2026 at 3:35 pm

    Doh just had to add sort($album); on the fourth line and it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can switch between windows with C-x o, but if I have opened multiple
In Eclipse, I can switch through open editors using control-page up/down. This works great,
In short: I want to have two fullscreen views, where I can switch between
I have multiple themes on my website and users can just switch between multiple
I have installed PDT 2.1 but i can't switch to the PHP Perspective, any
Where can I find the option to switch between the Windows Working Set in
I have 2 Fragment 's - A and B. In order to switch from
I have a table of ordered data like this ID ORDER 12 1 13
I have work that needs to be done in this order: In main activity:
User can switch active application by Alt+Tab or by clicking on their icons in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.