<?php
$beta_lists = array (
'Apple' => 'http://www.abc.mno/apple/',
'Ball' => 'http://www.abc.mno/ball/',
'Builders' => 'http://www.abc.mno/builders/',
'Bowling' => 'http://www.abc.mno/bowling/',
'Correct' => 'http://www.abc.mno/correct/',
'Campaign' => 'http://www.abc.mno/compain/',
'Direct' => 'http://www.abc.mno/direct/',
'Degree' => 'http://www.abc.mno/degree/'
);
ksort($beta_lists);
$groups = array();
foreach ($beta_lists as $title => $value) {
$groups[$title[0]][$title] = $value;
}
print_r($groups);
echo count($groups);
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.20, 8.3.0 - 8.3.8
- Array
(
[A] => Array
(
[Apple] => http://www.abc.mno/apple/
)
[B] => Array
(
[Ball] => http://www.abc.mno/ball/
[Bowling] => http://www.abc.mno/bowling/
[Builders] => http://www.abc.mno/builders/
)
[C] => Array
(
[Campaign] => http://www.abc.mno/compain/
[Correct] => http://www.abc.mno/correct/
)
[D] => Array
(
[Degree] => http://www.abc.mno/degree/
[Direct] => http://www.abc.mno/direct/
)
)
4
preferences:
123.93 ms | 404 KiB | 187 Q