Goodgame Empire

Paddy and his two friends are talking at a bar.

His first friend says: "I think my wife is having an affair with the electrician. The other day I came home and found wire cutters under our bed and they weren't mine."

His second friend says: "I think my wife is having an affair with the plumber the other day I found a wrench under the bed and it wasn't mine."

Paddy says: "I think my wife is having an affair with a horse." Both his friends look at him with utter disbelief.

"No, I'm serious. The other day I came home and found a jockey under our bed."
$x) { if($CURRENT_IMAGE == $img_listing[$x]) { if($x == 0) { //echo "found condition"; $lastimage = count($img_listing) - 1; $PREV_IMG = $img_listing[$lastimage]; $PREV_STUB= $stubs[$lastimage]; $NEXT_IMG = $img_listing[$x + 1]; $NEXT_STUB= $stubs[$x + 1]; } elseif(count($img_listing) - 1 == $x) { //echo "found condition"; $PREV_IMG = $img_listing[$x - 1]; $PREV_STUB= $stubs[$x - 1]; $NEXT_IMG = $img_listing[0]; $NEXT_STUB= $stubs[0]; } else { //echo "found condition"; $NEXT_IMG = $img_listing[$x + 1]; $NEXT_STUB= $stubs[$x + 1]; $PREV_IMG = $img_listing[$x - 1]; $PREV_STUB= $stubs[$x - 1]; } } $x++; } $total_jokes = count($stubs) - 1; $rand_joke = rand(0, $total_jokes); echo '

<-- PREVIOUS JOKE'; echo '   ' . 'RANDOM JOKE   '; echo 'NEXT JOKE -->'; ?>