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!


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -