묻고답하기

http://www.nzeo.com/bbs/zboard.php?id=p_study&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=랜덤&select_arrange=headnum&desc=asc&no=630

위에 회원님께서 팁을 남겨놓으션는데요..이 팁과 아래에 있는소스(랜덤배너정렬)를 봐주시고
이미지형식이 아닌 텍스트형식으로 출력해야할 텍스트링크가 한개가 아니라 여러개(수십개)를 랜덤형식으로출력해서 정렬하고 싶을때에는 어떻게 해야하는지 도움주십시오..

<?
// 이미지를 배열로 저장한다.
$bannerlink = array("http://링크될주소1.com","http://링크될주소2.com","http://링크될주소3.com","http://링크될주소4.com","http://링크될주소5.com","http://링크될주소6.com","http://링크될주소7.com");

$bannerImage = array("링크될주소1.com의베너.gif","링크될주소2.com의베너.gif","링크될주소3.com의베너.gif","링크될주소4.com의베너.gif","링크될주소5.com의베너.gif","링크될주소6.com의베너.gif","링크될주소7.com의베너.gif");
// 난수 발생기를 초기화한다.
        mt_srand(time());
        $t = mt_rand(0, count($bannerImage)-1);
?>
<html>
<head>
<meta http-equiv="Content-Language" content="ko">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<title>랜덤배너 정렬</title>
</head>

<body topmargin="0" leftmargin="0">

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="150" id="AutoNumber1" height="56">
  <tr>
    <td width="100%" height="22">
    <table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#666699" width="100%" id="AutoNumber2">
      <tr>
        <td width="100%">
        <p align="center">
        <a onclick="window.open('banner_pop.html','choice','toolbar=no,width=465,height=215')"><img border="0" src="img/ad.gif" width="107" height="12"></a></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="5"></td>
  </tr>
<?
  for($i=0; $i<count($bannerImage); $i++){
        $p = ($t+$i)%count($bannerImage);

        if(strrchr($bannerImage[$p],'.')==".gif") {
                echo "<tr><td width='100%' height='16'><a target='_blank' href='$bannerlink[$p]'><img border='0' src='$bannerImage[$p]' width='150' height='150'></a></td></tr><tr><td width='100%' height='4'></td></tr>";
        }else{
                echo "<tr><td width='100%' height='16'><embed src='$bannerImage[$p]' width='150' height='150'></td></tr><tr><td width='100%' height='4'></td></tr>";
        }

}
?>
</table>
</body>
</html>