Hello -
I am trying to display my form entries on the front end like so: (partially finished) http://cl.ly/0D3u2y2G2E3s3m2n1B1z
You will see the filters there. I am currently doing this to get them to show up:
$restaurant = RGFormsModel::get_leads(1, '8', 'ASC', '', '0', '99999999');
$restaurant_2 = RGFormsModel::get_leads(3, '8', 'ASC', '', '0', '99999999');
$rests = array_merge($restaurant, $restaurant_2);
foreach($rests as $rest) {
if(!empty($rest['8'])) :
$html = $rest['8'];
endif;
}
return $html;
This works fine, even with the array merge. However, it is showing duplicated items. I want to only show one result if there are duplicates. I have tried this using array_unique:
$restaurant = RGFormsModel::get_leads(1, '8', 'ASC', '', '0', '99999999');
$restaurant_2 = RGFormsModel::get_leads(3, '8', 'ASC', '', '0', '99999999');
$rests = array_merge($restaurant, $restaurant_2);
foreach(array_unique($rests) as $rest) {
if(!empty($rest['8'])) :
$html = $rest['8'];
endif;
}
return $html;
However, it stops after the first item like so:
http://cl.ly/1U3S2Y023W2D162X3538
Any thoughts here on how to get this to work. I am trying to use these a filtering navigation, so I really just need the single item, not the duplicates.