Got it working. Did this:
$year_value = 'val_' . $_SESSION['add_value_year'];
Then:
$value = "SELECT rb_values." . $year_value . ", rb_images.img_thumb, rb_images.img_lock, rb_notes.not_general, rb_notes.not_modern, rb_notes.not_specialized FROM rb_values, rb_images, rb_notes WHERE rb_values.val_id = $note[0] AND rb_images.img_id = $note[0] AND rb_notes.not_id = $note[0]";
Then I could use:
$row[$year_value]
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.