Is there any function to find repeated value in an array?
What is w2 standard
Answer / amitverma
Yes, there's a function for everything in PHP :)
To see the repeated values in an array you may use function
array_count_values($array);
This function will return you an array, consisting each
vaule's frequency associated with it.
##
#Following Code -
$array = array(1, "hello", 1, "world", "hello");
print_r(array_count_values($array));
##
#Outputs -
Array
(
[1] => 2
[hello] => 2
[world] => 1
)
| Is This Answer Correct ? | 11 Yes | 3 No |
Actually am working in existing project which is developed in .net, am converting the .net into php code. am facing problem after uploading the .php in server. amgetting the error message like "The page cannot be found" but its working perfectly in local host
what is the difference between ph4 and php5
In php, objects are they passed by value or by reference?
Is variable name casesensitive in php?
What is the name of scripting engine in php?
Which is better php or nodejs?
Where to put php files in apache server?
Do csrf tokens expire?
What is difference between echo and print in php?
What is better .net or php?
Is php front end?
what is the use of include_once in php?