mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 11:19:22 +02:00
14 lines
373 B
PHP
14 lines
373 B
PHP
<?php
|
|
/* Returns a PHP array $id => 'name'
|
|
$items = getItemList();
|
|
echo $items[2160]; // Returns 'Crystal Coin'
|
|
*/
|
|
function getItemList() {
|
|
$item_list = explode(PHP_EOL, file_get_contents('item_list.txt'));
|
|
$ia = array();
|
|
for ($i = 0; $i < count($item_list) - 1; $i++) {
|
|
$it = explode('@', $item_list[$i]);
|
|
$ia[(int)$it[0]] = ucfirst($it[1]);
|
|
}
|
|
return $ia;
|
|
} |