I'm using this structure to make album lists. I'm using a key so I correspond lists to albums but I don't know how to reverse the output so the items start at the top with lowest key value. Any ideas?
<?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 ' ';
}
echo '</div>';
}
?>
albumandalbum_listpost meta? – m0r7if3r Feb 10 '12 at 18:50