I've got db fields for category descriptions, each represents a different language....
desc_en (english)
desc_de (german)
desc_fr (french)
desc_es (spanish)
desc_it (italian)
Users will either have a cookie ($lang) variable, or it will default to "en". Based on that variable, I'd like to select the appropriate column from the db.
I can easily get the query by using:
"SELECT desc_" . $lang " FROM "...
But the problem is that the returned row from mysql_fetch_object requires the exact field name.
How do I call this field dynamically? The example below DOES NOT work and I'm not how to correctly format this...
$desc = $row->desc_{$lang}