<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Get Leads and remove duplicates for displaying on front end</title>
		<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end</link>
		<description>Gravity Support Forums Topic: Get Leads and remove duplicates for displaying on front end</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 07:46:58 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end" rel="self" type="application/rss+xml" />

		<item>
			<title>Rob Harrell on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-57457</link>
			<pubDate>Wed, 02 May 2012 13:57:12 +0000</pubDate>
			<dc:creator>Rob Harrell</dc:creator>
			<guid isPermaLink="false">57457@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Alex is the man! Glad you are rolling.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-57448</link>
			<pubDate>Wed, 02 May 2012 13:37:53 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">57448@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Awesome. Works perfectly! Thank you so much. I really appreciate it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-57155</link>
			<pubDate>Tue, 01 May 2012 11:40:34 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">57155@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You will probably need to change the way they are formatted, but I think the following snippet will point you in the right direction.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$restaurant = RGFormsModel::get_leads(1, &#38;#39;8&#38;#39;, &#38;#39;ASC&#38;#39;, &#38;#39;&#38;#39;, &#38;#39;0&#38;#39;, &#38;#39;99999999&#38;#39;);
    $restaurant_2 = RGFormsModel::get_leads(3, &#38;#39;8&#38;#39;, &#38;#39;ASC&#38;#39;, &#38;#39;&#38;#39;, &#38;#39;0&#38;#39;, &#38;#39;99999999&#38;#39;);
    $rests = array_merge($restaurant, $restaurant_2);

    $html = &#38;quot;&#38;quot;;
    //creating unique array of restaurant names
    $names = array();
    foreach($rests as $rest) {
        $name = $rest[&#38;#39;8&#38;#39;];
        if(!empty($name) &#38;amp;&#38;amp; !in_array($name, $names)){
            $names[] = $name;
            $html .= $name . &#38;quot; &#38;quot;;
        }
    }

    return $html;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-57070</link>
			<pubDate>Mon, 30 Apr 2012 20:24:37 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">57070@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I would like to just show the names of the restaurants. I already have working code to show all of the people that have signed up. For the people it is okay to have duplicates because they will be signing up for multiple restaurants.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-57056</link>
			<pubDate>Mon, 30 Apr 2012 17:10:16 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">57056@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Let me just clarify something so that I can give you a working code snippet. Do you just want to display the names of the the restaurant, or are you going to display any other information associated with them?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-57039</link>
			<pubDate>Mon, 30 Apr 2012 15:13:07 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">57039@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks Alex - &#60;/p&#62;
&#60;p&#62;not entirely sure how to handle that. But here are my Text files of the array merge and then the array unique.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://cl.ly/0d0R331O3u3t2k272v3a&#34; rel=&#34;nofollow&#34;&#62;http://cl.ly/0d0R331O3u3t2k272v3a&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I just used var_dump to show these.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Alex Cancado on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-56977</link>
			<pubDate>Mon, 30 Apr 2012 11:28:55 +0000</pubDate>
			<dc:creator>Alex Cancado</dc:creator>
			<guid isPermaLink="false">56977@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;array_unique() is not intended to be used with multi-dimension array, so I think that is where the unexpected behavior is coming from. Before calling array_unique(), try creating converting your $rests array into an array of strings instead.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-56842</link>
			<pubDate>Fri, 27 Apr 2012 16:04:51 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">56842@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm really not sure why having the unique call would stop the foreach from going through all the values. &#60;/p&#62;
&#60;p&#62;Could you print the rests array to a text file so we can take a look at it? Maybe even print the unique rests to a text file as well. Maybe the unique call isn't doing what it should for some unknown reason.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-56841</link>
			<pubDate>Fri, 27 Apr 2012 16:00:40 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">56841@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sadly, that produces the same issue with it stopping after one item.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Get Leads and remove duplicates for displaying on front end"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/get-leads-and-remove-duplicates-for-displaying-on-front-end#post-56840</link>
			<pubDate>Fri, 27 Apr 2012 15:57:05 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">56840@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you try to do the array_unique call before the foreach and see if that solves your issue.&#60;br /&#62;
Something like:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$unique_rests = array_unique($rests);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I'm no sure why it isn't working, but I want to reduce the chance that it has to do with doing the array_unique inside the foreach.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
