PDA

View Full Version : Question about using array to create dropdown menu


Antivirus
01-23-2007, 02:10 PM
I'm using this array to create a dropdown menu in the AdminCP for a hack I'm working on. The phrase is what shows in the dropdown, however the number on left ends up being the value inserted into db based upon which option is selected. My problem, however is that I need for both 'feedback_awaiting_approval' and 'better_feedback_needed' to have a value of 0.


$pointoptions = array(
0 => $vbphrase['feedback_awaiting_approval'],
1 => $vbphrase['better_feedback_needed'],
2 => $vbphrase['average_feedback'],
3 => $vbphrase['good_feedback'],
4 => $vbphrase['very_good_feedback'],
6 => $vbphrase['excellent_feedback']
);


If i assign both to 0, i get an error because it's the key it needs a unique value, so my question is "how can I get around this without another array like 1 => [0][$vbphrase['feedback_awaiting_approval'], etc..."?

:confused:

thanks

Antivirus
01-27-2007, 02:16 PM
anyone please?