Skip to content

Instantly share code, notes, and snippets.

@whyisjake
Created February 25, 2013 19:19
Show Gist options
  • Save whyisjake/5032414 to your computer and use it in GitHub Desktop.
Save whyisjake/5032414 to your computer and use it in GitHub Desktop.
Simple image swapper
<?php
$arr = array('http://placekitten.com/300/250', 'http://placekitten.com/400/150');
$shuffle = array_rand($arr, 1);
// print_r($shuffle);
echo '<img src="' . esc_url( $arr[$shuffle] ) . '" />';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment