Working on a poll script, but I have little problems with the options of a poll, creating a new array of it.
The actual example array contains 3 sub-arrays with options, sum of votes and percentage:
Array
(
[poll_options] => Array
(
[0] => Good
[1] => Bad
[2] => I do not care
)
[poll_answers] => Array
(
[0] => 3
[1] => 1
[2] => 1
)
[poll_percentage] => Array
(
[0] => 60
[1] => 20
[2] => 20
)
)
Now I need to create a new array of the values, the result must be like this:
Array
(
[0] => Array
(
[option] => Good
[answers] => 3
[percentage] => 60
)
[1] => Array
(
[option] => Bad
[answers] => 1
[percentage] => 20
)
[2] => Array
(
[option] => I do not care
[answers] => 1
[percentage] => 20
)
)
Whatever tried so far, I just can't reach this result I want. Any ideas?