There are also these useful techniques in PHP

WBOY
Release: 2016-07-29 08:51:14
Original
1044 people have browsed it

array_count_values

Count the number of occurrences of all values ​​in a one-dimensional array

<code><span>$array</span> = <span>array</span>(<span>1</span>, <span>"hello"</span>, <span>1</span>, <span>"world"</span>, <span>"hello"</span>);
print_r(array_count_values(<span>$array</span>));</code>
Copy after login

Output:

<code><span>Array</span>
(
    [<span>1</span>] => <span>2</span>
    [hello] => <span>2</span>
    [world] => <span>1</span>
)</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced these useful techniques in PHP, including related content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template