// Put banner-code placeholders passed from bannerListCallMtkLib snippet into $sortedBanners array
$sortedBanners = array(
   $sortedBanner0,
   $sortedBanner1,
   $sortedBanner2,
   $sortedBanner3,
   $sortedBanner4,
   $sortedBanner5,
   $sortedBanner6,
   $sortedBanner7,
   $sortedBanner8,
   $sortedBanner9,
   $sortedBannerLatest);

// Randomise the entries in the $sortedBanners array
shuffle($sortedBanners);

// Create numbered 'shuffledBanner' placeholders for use in the Mtk page
$shuffledBanners = array(
  'shuffledBanner0' => $sortedBanners[0],
  'shuffledBanner1' => $sortedBanners[1],
  'shuffledBanner2' => $sortedBanners[2],
  'shuffledBanner3' => $sortedBanners[3],
  'shuffledBanner4' => $sortedBanners[4],
  'shuffledBanner5' => $sortedBanners[5],
  'shuffledBanner6' => $sortedBanners[6],
  'shuffledBanner7' => $sortedBanners[7],
  'shuffledBanner8' => $sortedBanners[8],
  'shuffledBanner9' => $sortedBanners[9],
  'shuffledBannerLatest' => $sortedBanners[10]);
$modx->setPlaceholders($shuffledBanners);