Add array of category IDs to global variable?

Simple solution- use GLOBAL variables..

$GLOBALS['my_categories_list'] = array(1,2,3,4);

then you can everywhere access $GLOBALS['my_categories_list'].

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)