开头的数组密钥我当前循环访问数组并将值收集到另一个数组中。PHP foreach获得以
foreach($percentage_array[$scenario_first] as $type => $value) {
$first = substr($type,0,$first_letters_count);
if(strlen($type)==$sc_type) {
if($first==$scenario) {
$percentages[] = $value;
$scenario_array[$type] = $value;
}
}
}
而是通过数组循环的,我想与x
例如开头的所有键为xaa,XAB,西飞
所以不是我做$percentage_array[$scenario_first][beginning_with_x]
我该怎么做呢?