CodeIgniter Forums
newbie - logging question - function_array-count-values - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: newbie - logging question - function_array-count-values (/showthread.php?tid=32279)



newbie - logging question - function_array-count-values - El Forum - 07-18-2010

[eluser]Unknown[/eluser]
I have a simple log function on my site and frequently see the 'function_array-count-values' as a requested segement. What is somebody looking for with this?


newbie - logging question - function_array-count-values - El Forum - 07-20-2010

[eluser]pickupman[/eluser]
[url="http://php.net/manual/en/function.array-count-values.php"]array_count_values[/url] would be used to combine/count how many times a value exists in an array. Say you have a log field in a result array. You could use to find how many times a field value exists in the table, and then asort() to sort the array. You would then have an ascending report of values.