2[hello] => 2[world] => 1 ) $(function () {$('pre.pret"/> 2[hello] => 2[world] => 1 ) $(function () {$('pre.pret">

Home >Backend Development >PHP Tutorial >There are also these useful techniques in PHP

There are also these useful techniques in PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:51:141080browse

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>

Output:

<code><span>Array</span>
(
    [<span>1</span>] => <span>2</span>
    [hello] => <span>2</span>
    [world] => <span>1</span>
)</code>
').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.

Statement:
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