<?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.4, 8.3.6 - 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
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
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:
162.92 ms | 403 KiB | 187 Q