JamesThePanda Posted February 12, 2013 Share Posted February 12, 2013 array (james, john, pingo, adam, john, james, pingo, barney, pingo, ); I was wondering if there is an in-built PHP function that would list all the names once. IE james john pingo adam barney not : james john pingo adam john james pingo barney pingo I have been googling this and cant seem to fnd what I want, having a hard time explain it in a google search term. Thanks James Quote Link to comment https://forums.phpfreaks.com/topic/274388-values-in-array/ Share on other sites More sharing options...
dmcglone Posted February 12, 2013 Share Posted February 12, 2013 Have you had a look at the in_array function? http://www.php.net/manual/en/function.in-array.php Quote Link to comment https://forums.phpfreaks.com/topic/274388-values-in-array/#findComment-1411925 Share on other sites More sharing options...
trq Posted February 12, 2013 Share Posted February 12, 2013 I have been googling this and cant seem to fnd what I want, having a hard time explain it in a google search term. So... have a look in the manual. I'm not going to lead you directly to the function, but if you don't find it on this page within 30 seconds there is something seriously wrong. Quote Link to comment https://forums.phpfreaks.com/topic/274388-values-in-array/#findComment-1411927 Share on other sites More sharing options...
JamesThePanda Posted February 12, 2013 Author Share Posted February 12, 2013 Thank you I think its the array_unique function. I'm sorry for asking such a obvious question , I'm dyslexic so sometimes I miss things that are right in front of me. Thanks James Quote Link to comment https://forums.phpfreaks.com/topic/274388-values-in-array/#findComment-1411931 Share on other sites More sharing options...
dmcglone Posted February 12, 2013 Share Posted February 12, 2013 I completely forgot about that function. I believe that would work better than my original reply. :-) Quote Link to comment https://forums.phpfreaks.com/topic/274388-values-in-array/#findComment-1411942 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.