Hi,
I have a set of variables in a DB that differ by the last digit:
image_name_1
image_name_2
etc
the last digit represents the language, eg 1= english, and is stored in a superglobal
I tried to display the row like this:
$language = $_POST['language']; //this is a single digit eg 1,2,3 etc
echo "<h3> $row['image_name_{$language}'] </h3>";
..but it gives me an error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
I suppose this is due to the substitution of $language inside another variable? How can I solve this?
thanks,
Patrick