I am using the following tutorial to learn how to shuffle in PHP, but the output is ugly. How do I change the output of the shuffle to be more in line with the poll I want to display in list format?
I am using the following tutorial to learn how to do this:
http://www.w3schools.com/php/func_array_shuffle.asp
<?php
$my_array = array("a" => "Dog", "b" => "Cat", "c" => "Horse");
shuffle($my_array);
print_r($my_array);
?
But the output is ugly: Array ( [0] => Cat [1] => Dog [2] => Horse )
How do I make the shuffle array look nice an pretty like this?
<ul>
<li><input id="pollRadioButton1" name="pollAnswerID" type="radio" value="1" /> Answer1 for Poll1</li>
<li class="pollChart pollChart1"> </li>
<li><input id="pollRadioButton2" name="pollAnswerID" type="radio" value="2" /> Answer2 for Poll1</li>
<li class="pollChart pollChart2"> </li>
</ul>