I'm trying to finish up a backend panel for one of my themes because my php is not the best but I'm having a little trouble getting past this last issue.
Question:
I have a "question" database [see attachment] that is being managed through an additional page within the Wordpress backend. basically, there are two groups of questions and three sets of five questions within each group.
For each group a default set must be selected.
So for example:
The group one field is called "showcaseset", with the first set in that group labeled "sq1", set two is "sq2" and set 3 is "sq3". The questions for each set then are labeled in the same way: "sq11", "sq12", "sq13", etc.
Right now if I do something like:
PHP Code:
<?php echo get_option('sq11'); ?>
It will grab the first question from set 1 of the showcase question group. But, to limit code and make things a little more dynamic what I want to do is combine whatever the default set is (ie: sq1, sq2, or sq3) with the number of the question.
To make things a little more clearer:
php echo get_option [sq#] + [static # 1 through 5]
In other words, I would be repeating whatever this line and just changing the static number at the end to a number 1 through five.
Ultimately what I want to happen is the saved option for the current set will be grabbed along with a static number of that question so that the end result echo will be "sq11", "sq12", or etc depending on where it is placed in the template.
Thanks in advance and happy new year!