<?php
$banners = Array
(
  "http://localhost/banners/image1.gif",
  "http://localhost/banners/image2.gif",
  "http://localhost/banners/image3.gif"
);

$links = Array
(
  "http://helion.pl/ksiazki/101ps2.htm",
  "http://helion.pl/ksiazki/php102.htm",
  "http://helion.pl/ksiazki/cwjas2.htm"
);

$indeks = array_rand($banners);
$img = $banners[$indeks];
$link = $links[$indeks];
echo "$img\n$link";
?>