$list_IP_entry
array(160) {
  [0]=>
  string(28) "66.249.65.239, 172.69.71.147"
  [1]=>
  string(28) "207.46.13.43, 108.162.246.12"
  [2]=>
  string(29) "108.5.183.203, 172.70.110.187"
  [3]=>
  string(29) "5.255.253.110, 172.68.246.181"
  [4]=>
  string(30) "87.250.224.161, 172.68.246.181"
  [5]=>
  string(29) "103.131.71.107, 172.70.142.41"
  [6]=>
  string(29) "207.46.13.177, 108.162.246.12"
  [7]=>
  string(28) "185.191.171.42, 172.70.34.53"
  [8]=>
  string(30) "103.131.71.62, 162.158.167.199"
  [9]=>
  string(31) "213.180.203.175, 172.68.246.181"
  [10]=>
  string(30) "114.119.129.218, 172.70.143.76"
  [11]=>
  string(31) "114.119.129.218, 172.70.188.163"
  [12]=>
  string(29) "88.198.25.244, 162.158.91.162"
  [13]=>
  string(31) "114.119.130.29, 162.158.167.217"
  [14]=>
  string(29) "17.121.113.216, 172.70.98.183"
  [15]=>
  string(29) "185.191.171.17, 172.68.65.125"
  [16]=>
  string(29) "17.121.113.249, 172.70.98.183"
  [17]=>
  string(30) "144.76.112.151, 141.101.104.90"
  [18]=>
  string(26) "162.55.86.61, 141.101.76.9"
  [19]=>
  string(28) "104.222.149.62, 172.70.34.41"
  [20]=>
  string(30) "104.222.149.62, 172.70.174.173"
  [21]=>
  string(29) "104.222.149.62, 172.70.135.82"
  [22]=>
  string(30) "114.119.129.229, 172.70.143.76"
  [23]=>
  string(29) "87.250.224.77, 172.68.246.181"
  [24]=>
  string(27) "157.55.39.84, 172.70.211.78"
  [25]=>
  string(32) "114.119.129.229, 162.158.167.219"
  [26]=>
  string(55) "2001:ee0:438e:5730:d8e4:b7f4:e572:f1c8, 162.158.179.252"
  [27]=>
  string(28) "88.198.25.244, 162.158.92.63"
  [28]=>
  string(29) "114.119.129.22, 172.70.143.76"
  [29]=>
  string(25) "77.88.5.50, 172.68.244.47"
  [30]=>
  string(27) "66.249.66.210, 172.70.35.16"
  [31]=>
  string(27) "66.249.66.1, 172.70.134.157"
  [32]=>
  string(31) "114.119.129.218, 172.70.188.253"
  [33]=>
  string(27) "88.99.150.47, 162.158.92.49"
  [34]=>
  string(28) "162.55.86.61, 162.158.88.223"
  [35]=>
  string(29) "157.55.39.188, 162.158.146.71"
  [36]=>
  string(30) "114.119.129.208, 172.70.142.55"
  [37]=>
  string(29) "185.191.171.26, 172.70.175.12"
  [38]=>
  string(26) "77.88.5.130, 172.68.244.47"
  [39]=>
  string(29) "185.191.171.19, 172.70.175.34"
  [40]=>
  string(30) "114.119.129.218, 172.70.92.249"
  [41]=>
  string(28) "66.249.66.28, 172.70.134.157"
  [42]=>
  string(27) "66.249.64.148, 172.69.63.26"
  [43]=>
  string(28) "162.55.86.61, 162.158.203.66"
  [44]=>
  string(32) "114.119.129.233, 162.158.165.187"
  [45]=>
  string(25) "77.88.5.86, 172.68.244.47"
  [46]=>
  string(29) "88.198.25.244, 162.158.89.164"
  [47]=>
  string(29) "157.55.39.192, 108.162.246.12"
  [48]=>
  string(28) "162.55.86.61, 162.158.89.180"
  [49]=>
  string(28) "162.55.86.61, 162.158.90.155"
  [50]=>
  string(30) "114.119.129.233, 172.70.147.37"
  [51]=>
  string(29) "207.46.13.78, 162.158.107.108"
  [52]=>
  string(30) "103.131.71.64, 162.158.162.117"
  [53]=>
  string(32) "181.177.121.122, 108.162.219.165"
  [54]=>
  string(30) "114.119.129.22, 172.70.142.205"
  [55]=>
  string(28) "162.55.86.61, 141.101.105.25"
  [56]=>
  string(28) "66.249.64.148, 162.158.79.42"
  [57]=>
  string(29) "66.249.64.129, 172.70.134.157"
  [58]=>
  string(29) "93.158.161.76, 172.68.246.211"
  [59]=>
  string(28) "66.249.69.208, 172.70.178.93"
  [60]=>
  string(29) "185.191.171.38, 172.70.175.28"
  [61]=>
  string(29) "114.119.129.235, 172.70.93.29"
  [62]=>
  string(28) "66.249.69.212, 162.158.75.23"
  [63]=>
  string(28) "66.249.69.222, 172.70.178.93"
  [64]=>
  string(27) "72.79.58.186, 172.70.230.37"
  [65]=>
  string(30) "103.131.71.78, 162.158.162.117"
  [66]=>
  string(29) "207.46.13.48, 162.158.107.108"
  [67]=>
  string(32) "114.119.159.135, 162.158.162.243"
  [68]=>
  string(54) "2001:ee0:4101:7823:e824:975c:8652:9f6d, 162.158.179.92"
  [69]=>
  string(28) "66.249.69.208, 162.158.75.23"
  [70]=>
  string(55) "2001:ee0:4101:7823:8124:8588:bf92:1f34, 162.158.178.108"
  [71]=>
  string(28) "66.249.69.192, 172.70.178.93"
  [72]=>
  string(13) "66.249.69.212"
  [73]=>
  string(30) "103.131.71.181, 172.70.147.105"
  [74]=>
  string(28) "5.45.207.129, 172.68.246.211"
  [75]=>
  string(26) "40.77.167.0, 172.70.175.94"
  [76]=>
  string(28) "66.249.66.210, 162.158.79.42"
  [77]=>
  string(28) "66.249.66.222, 162.158.79.42"
  [78]=>
  string(30) "114.119.150.209, 172.70.189.98"
  [79]=>
  string(28) "162.55.86.61, 162.158.91.132"
  [80]=>
  string(31) "103.131.71.175, 162.158.162.117"
  [81]=>
  string(28) "17.121.115.24, 172.70.211.78"
  [82]=>
  string(27) "40.77.167.0, 172.70.134.157"
  [83]=>
  string(31) "114.119.150.226, 162.158.162.19"
  [84]=>
  string(28) "162.55.86.61, 162.158.90.233"
  [85]=>
  string(29) "185.191.171.44, 172.70.34.135"
  [86]=>
  string(30) "103.131.71.90, 162.158.178.236"
  [87]=>
  string(29) "117.5.147.205, 162.158.178.43"
  [88]=>
  string(28) "95.108.213.70, 172.68.244.73"
  [89]=>
  string(30) "117.5.147.119, 162.158.178.244"
  [90]=>
  string(30) "207.46.13.104, 162.158.107.108"
  [91]=>
  string(29) "14.161.26.173, 172.70.188.245"
  [92]=>
  string(31) "103.131.71.223, 162.158.178.236"
  [93]=>
  string(31) "103.131.70.162, 162.158.178.236"
  [94]=>
  string(30) "114.119.150.209, 172.70.189.38"
  [95]=>
  string(28) "66.249.64.188, 172.70.175.94"
  [96]=>
  string(29) "66.249.64.180, 172.70.134.157"
  [97]=>
  string(28) "162.55.86.61, 172.70.251.148"
  [98]=>
  string(27) "66.249.74.32, 172.70.126.71"
  [99]=>
  string(28) "66.249.74.48, 172.70.130.157"
  [100]=>
  string(27) "40.77.167.66, 172.70.175.94"
  [101]=>
  string(31) "103.131.71.184, 162.158.178.236"
  [102]=>
  string(28) "114.119.150.22, 172.70.93.13"
  [103]=>
  string(30) "113.173.178.207, 172.70.143.46"
  [104]=>
  string(26) "77.88.5.136, 172.68.50.209"
  [105]=>
  string(28) "162.55.86.61, 162.158.92.131"
  [106]=>
  string(27) "66.249.64.178, 172.70.35.16"
  [107]=>
  string(28) "66.249.64.176, 172.70.38.233"
  [108]=>
  string(30) "111.225.148.82, 172.70.210.111"
  [109]=>
  string(31) "103.131.71.186, 162.158.178.236"
  [110]=>
  string(31) "114.119.144.36, 162.158.162.165"
  [111]=>
  string(28) "40.77.167.66, 172.70.134.157"
  [112]=>
  string(27) "40.77.167.66, 172.70.38.233"
  [113]=>
  string(30) "185.191.171.21, 172.70.135.202"
  [114]=>
  string(30) "107.173.163.237, 172.69.33.105"
  [115]=>
  string(30) "107.173.163.237, 172.69.33.131"
  [116]=>
  string(31) "107.173.163.237, 172.70.214.113"
  [117]=>
  string(30) "107.173.163.237, 172.70.214.47"
  [118]=>
  string(31) "103.131.71.175, 162.158.178.236"
  [119]=>
  string(28) "88.198.25.244, 162.158.92.31"
  [120]=>
  string(28) "162.55.86.61, 162.158.90.149"
  [121]=>
  string(31) "103.131.71.159, 162.158.178.236"
  [122]=>
  string(26) "40.77.167.6, 172.70.175.94"
  [123]=>
  string(29) "104.243.194.88, 172.70.54.253"
  [124]=>
  string(29) "104.243.194.88, 172.70.254.27"
  [125]=>
  string(29) "66.249.64.190, 172.70.134.157"
  [126]=>
  string(29) "185.191.171.37, 172.70.38.103"
  [127]=>
  string(29) "66.249.64.176, 172.70.134.157"
  [128]=>
  string(27) "66.249.66.208, 172.70.35.16"
  [129]=>
  string(28) "66.249.66.192, 172.70.38.233"
  [130]=>
  string(27) "161.0.2.166, 172.70.114.123"
  [131]=>
  string(26) "161.0.2.166, 172.70.114.37"
  [132]=>
  string(26) "161.0.2.166, 172.70.230.81"
  [133]=>
  string(28) "185.191.171.7, 172.70.174.75"
  [134]=>
  string(28) "66.249.64.180, 172.70.38.233"
  [135]=>
  string(30) "185.191.171.19, 172.70.174.231"
  [136]=>
  string(31) "114.119.150.226, 172.70.188.147"
  [137]=>
  string(31) "103.131.71.174, 162.158.178.236"
  [138]=>
  string(28) "66.249.64.176, 172.70.175.94"
  [139]=>
  string(32) "114.119.150.208, 162.158.170.133"
  [140]=>
  string(31) "181.177.122.232, 172.70.114.239"
  [141]=>
  string(31) "181.177.122.232, 172.70.230.125"
  [142]=>
  string(30) "181.177.122.232, 172.70.230.81"
  [143]=>
  string(30) "181.177.122.232, 162.158.62.79"
  [144]=>
  string(30) "103.131.71.78, 162.158.178.236"
  [145]=>
  string(30) "114.119.150.208, 172.70.188.97"
  [146]=>
  string(29) "95.181.238.53, 172.70.114.249"
  [147]=>
  string(28) "60.77.228.47, 172.68.118.227"
  [148]=>
  string(30) "114.119.150.209, 172.70.188.31"
  [149]=>
  string(31) "193.235.141.23, 162.158.222.121"
  [150]=>
  string(31) "193.235.141.23, 162.158.222.123"
  [151]=>
  string(27) "88.99.150.47, 172.70.242.37"
  [152]=>
  string(27) "95.108.213.25, 141.101.76.7"
  [153]=>
  string(29) "23.101.206.60, 172.70.206.175"
  [154]=>
  string(31) "23.101.194.183, 162.158.166.125"
  [155]=>
  string(31) "103.131.71.237, 162.158.178.236"
  [156]=>
  string(30) "114.119.150.215, 162.158.162.3"
  [157]=>
  string(28) "157.55.39.31, 162.158.146.71"
  [158]=>
  string(27) "162.55.86.61, 172.70.251.88"
  [159]=>
  string(29) "3.238.180.255, 172.70.175.168"
}
Hàm array_count_values trong PHP

Hàm array_count_values trong PHP

Hàm array_count_values trong php là một hàm xử lý mảng trong php. Nó có tác dụng đếm số lân giá trị trong mảng lặp lại. Nó trả về mảng mới có các key là các giá trị của mảng tham số. Và có value là số lần lặp lại của giá trị trong mảng tham số. Bạn theo dõi cú pháp và ví dụ về hàm array_count_values trong php dưới đây để hiểu hơn. Bài viết này thuộc chuyên mục PHP developer.

Cách sử dụng hàm array_count_values trong php

Hàm array_count_values trong PHP
Hàm array_count_values trong PHP

Cú pháp hàm array_count_values trong php:

array_count_values($array)
  • $array: Mảng tham số chứa các value lặp lại

Ví dụ về hàm array_count_values() trong php:

$array = array('chuanseoweb', 'chuanseoweb', 'abc', 'abc', 'abc', 'chuanseoweb.com');
$result = array_count_values($array);

echo '<pre>';
print_r($result);
echo '</pre>';

Ở ví dụ trên mình có 1 mảng có giá trị chuanseoweb lặp lại 2 lần. Giá trị abc lặp lại 3 lần, giá trị chuanseoweb.com lặp lại 1 lần. Ta sẽ thu mảng có giá trị như sau:

Array
(
    [chuanseoweb] => 2
    [abc] => 3
    [chuanseoweb.com] => 1
)

Như vậy bạn đã hiểu hơn về hàm array_count_values(). Nếu có câu hỏi hay thắc mắc gì bạn vui lòng để lại bình luận bên dưới. Cám ơn bạn đã quan tâm bài viết.

Nguyễn Luân

MÌnh là Luân. Mình có 4 năm kinh nghiệm trong lập trình website và 3 năm làm về WordPress theme và plugin. Rất hy vọng có cơ hội hợp tác với mọi người. Xin cám ơn.

Có thể bạn quan tâm

Hàm array_count_values trong PHP

9 Tháng Mười Một, 2021 Bởi

Hàm array_count_values trong php là một hàm xử lý mảng trong php. Nó có tác dụng đếm số lân giá trị trong mảng lặp lại. [...]

Hàm array_column trong PHP

7 Tháng Mười Một, 2021 Bởi

Hàm array_column trong PHP là một hàm xử lý mảng trong php. Hàm này có tác dụng lấy ra một mảng đơn từ mảng đa chiều. [...]

Bạn để lại bình luận tại đây

favico-1

ChuanSeoWeb.com

Minh Phượng , Nham BIền, Yên Dũng, Bắc Giang
Thời gian hoạt động:
T.2 – T.7: 07:30 am – 5:30 pm