Here is a snippet I am going to use to create a poll. Is there an easy way to make these questions appear randomly upon each visit? I’d like to put this in some sort of a PHP or javascript array. Can someone point me to a good tutorial to learn how to do this?
<div id="pollWrap">
<form action="inc/functions.php?action=vote" method="post" name="pollForm">
<h3>Poll Question 1</h3>
<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>
<input id="pollSubmit" name="pollSubmit" type="submit" value="Vote" /> <img alt="Ajax Loader" id="pollAjaxLoader" src="ajaxLoader.gif" /></form>
</div>
If your html is constructed by php (which you give a hint to by using the tag php but omit otherwise…) you can put the li tags inside an array and sort that prior to outputting them.
If that html is static (or does not result from some script under your control) then you can use javascript to reorder the li tags on the client side.