Refreshing random content

What would be the jQuery-based way of refreshing random content that is currently managed by PHP?

$num = Rand (1,5);
switch ($num) {
case 1:
echo '<div>Random content</div>';
break;
// and so on...
}

I’d like to add the option to refresh this content with jQuery. I’m not sure how this might work (I’m only an amateur coder and not familiar with JS beyond using plugins). Would it be as simple as adding an ID to each div and then somehow displaying a new div at each click of an anchor? It doesn’t really need to be random: in number order would be fine. I want to keep the underlying PHP method, or a near equivalent, so that it degrades nicely.

make a button that calls a function that dos wan of the things described here:

If you fave few ranom contents (witch are not long):
put the values in an array and call a random one with ath.round(Math.random()*number_of_contents)

Or you could make a div for each random content and than use jQuery’s hide and show to show and hide the content. and use jQuery(“.random_content_div”).get(int) where “int” is a random integer to get a random element to show up.

If you have manny random contents
Use ajax to get your content from a PHP script