我有此數組:計數特定陣列值開始的東西
$array = array("pg_1","pg_2","pg_3","pg_4","pg_5","qr_1","qr_2","qr_3");
我想指望這是價值觀開始與皮克。
到目前爲止,我已經嘗試下面的代碼:
$arraycount = array_count_values($array);
$countpg = $arraycount['pg%'];
我忘了,我有鍵和值:
$array = Array ([pg_1] => 2 [pg_2] => 3 [pg_3] => 2 [pg_4] => 4 [pg_5] => 1 [gp_1] => 1 [gp_2] => 4 [gp_3] => 3)