PHP Programing language

array_count_values() Function in PHP
Previous Home Next

array_count_values()

The array_count_values() function counts all the values of an array.

Syntax:
array_count_values(array)

In above Syntax,"array" is used to count values.

Example:

<?php
$array = array("An","Apple","Mango","Apple","Mango");
print_r(array_count_values($array));
?>

Output:

Array ( [An] => 1 [Apple] => 2 [Mango] => 2 )

 

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: