Combine two foreach Arrays into one table row
Question
right now I have two foreach arrays - one outputs the artist, the other a track title
I would like to combine both so there is a row for each artist and corresponding track
for example:
Row 1 - Artist 1 Track 1
Row 2 - Artist 2 Track 2
<?php // Get duplicate fields
$duplicate_field = get_post_custom_values('Artist', $post->ID);
foreach ( $duplicate_field as $key => $value ) {
echo $value . '<br />';
}
?>
<?php // Get duplicate fields
$duplicate_field = get_post_custom_values('Track', $post->ID);
foreach ( $duplicate_field as $key => $value ) {
echo $value . '<br />';
}
?>
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange