Goodgame Empire

There is a handsome young man, a beautiful young girl, the young girl's mother, an army general and a lowly private on board a train. The ride has been going on for about half an hour, and they've all politely been glancing about at each other.

The train then went into a tunnel, a kissing sound was heard, and there was a slap. During this, the mother was thinking: "That boy has been eyeing my daughter, and now he kissed her, and my daughter slapped him. Good for her!" The daughter was thinking: "That handsome boy meant to kiss me, but kissed my mother instead, and she slapped him!" The handsome guy was thinking: "That general kissed that girl's mother, and she slapped him. I would've too, he's pretty ugly!" The General was thinking: "That handsome boy kissed that beautiful girl, and I was accidentally slapped by the beautiful girl. Ouch, that's going to leave a mark." And the lowly private thought: "Whoah, I kiss the back of my hand and get to hit the boss. I love trains."
$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 -->'; ?>