Skip to content

Instantly share code, notes, and snippets.

@gnuget
Created October 24, 2010 19:56
Show Gist options
  • Save gnuget/643920 to your computer and use it in GitHub Desktop.
Save gnuget/643920 to your computer and use it in GitHub Desktop.
Get duplicate fields in duplicate groups
<?php
/** in this example my field is dd_field and i can get the index of the groups using a field name
* (http://wiki.magicfields.org/doku.php?id=front-end_functions#getgrouporder)
*/
$grupos = getGroupOrder('dd_field');
/** now, using the index of the groups i can get all the duplicate fields into a group**/
foreach($grupos as $grupo) {
/** get_field_duplicate return a array with all values of a field **/
/**http://wiki.magicfields.org/doku.php?id=front-end_functions#get_field_duplicate**/
$fields = get_field_duplicate('dd_field',$grupo);
print_r($fields);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment