calmchess Posted June 6, 2013 Share Posted June 6, 2013 How do I search an array by string value and return the number of times that string occurs in an array? Is there a handy PHP method I don't know about that does this. my google search only comes up with array_search does setting it to strict do what I want? Thanks for taking the time to read this. --calmchess Link to comment https://forums.phpfreaks.com/topic/278847-searching-an-array/ Share on other sites More sharing options...
Jessica Posted June 6, 2013 Share Posted June 6, 2013 array_count_values Link to comment https://forums.phpfreaks.com/topic/278847-searching-an-array/#findComment-1434460 Share on other sites More sharing options...
calmchess Posted June 6, 2013 Author Share Posted June 6, 2013 well that was unusual way of accomplishing a task but it worked .......added to the ole toolbox in my head Thanks. Link to comment https://forums.phpfreaks.com/topic/278847-searching-an-array/#findComment-1434464 Share on other sites More sharing options...
Jessica Posted June 6, 2013 Share Posted June 6, 2013 How is that unusual?? It's for exactly what you described. I personally can't believe you did any research and didn't find it. The PHP manual is your friend. Link to comment https://forums.phpfreaks.com/topic/278847-searching-an-array/#findComment-1434466 Share on other sites More sharing options...
calmchess Posted June 6, 2013 Author Share Posted June 6, 2013 well i mean an unusual name to search for I would think a google search for PHP search array would have given me results. At any rate thanks. --calmchess Link to comment https://forums.phpfreaks.com/topic/278847-searching-an-array/#findComment-1434526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.