php - Creating named session array from mysql fetch array -
i have database table called translations. has several columns, trying create session array house variale:translations named array.
i've tried below code, must missing something... end goal populate of static verbiage of website using $_session['translations']['userboards']
example populate names of otherwise static content language supported based on database.
$querylang = "select variable,translation translations left outer join languages on languages.abbrev = translations.fkabbrev languages.abbrev = 'en'"; $sqllang = mysql_query($querylang); while($reslang = mysql_fetch_array($sqllang)){ $_session['translations'][$reslang['variable']] = $reslang['translation']; };
the above code correct. reason didn't work separate issue. @epodax reminding me check errorlog!