To store in datastore
Code:
require_once(DIR . '/includes/functions.php');
build_datastore('countries', serialize($countries), 1);
You need a plugin in "init_startup"
Code:
if(THIS_SCRIPT == 'showthread') // or whatever file reads the array
{
$datastore_fetch[] = "'countries'";
}
Then the array should be available as $vbulletin->countries
--------------- Added [DATE]1417752544[/DATE] at [TIME]1417752544[/TIME] ---------------
Quote:
Originally Posted by kh99
Edit : BTW, there's also a function that swaps keys and values, but I can't remember what that one's called either. 
|
array_flip()
http://www.w3schools.com/php/func_array_flip.asp