How to use proper variable in php?
i have variable $lang which convert string to the selected language but i am unable to convert the string getting form database

working  
`echo $lang["hello"];`
    

not working   
`$rowtxt = $row[0];`  
`echo $lang[$rowtxt];`  it shows error.

what is the correct way to do this can any one tell me i am a beginner ?.
How to use proper variable in php?
===

i have variable $lang which convert string to the selected language but i am unable to convert the string getting form database

working  
`echo $lang["hello"];`
    

not working   
`$rowtxt = $row[0];`  
`echo $lang[$rowtxt];`  it shows error.

what is the correct way to do this can any one tell me i am a beginner ?.