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
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.