Published on : September 01, 2020
Title: Array count values
Purpose :The array_count_values() function counts all the values of an array.
Syntax :[php.array_count_values p1=”{template.info}” o.set=template.res /]
Input Parameter :Array
Return value : Returns an associative array, where the keys are the original array’s values, and the values are the number of occurrences
Example :
[template.set_array x a1=1 a2=2 a3=3 /] [php.array_count_values p1=”{template.x}” o.set=template.res /] [template.echo res /]
Output : New array with count of values
Description: We can get the count of values using this function