Can Any One Tell me How Should I add RAndom Links Script Two Times In One Pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can Any One Tell me How Should I add RAndom Links Script Two Times In One Pages

    hello guys any body can help me how to add random links php codes to my site pages and tell me how to add random links appears two times in one page of mine site
    Attached Files

    #2
    PHP Code:
    <? 
     
    //set the urls 
    $urls = array("http://google.com" ,"http://hotmail.com" ,"http://hawkee.com" ); 
     
    //set the text links 
    $text = array("Google" ,"Hotmail" ,"Hawkee"); 
            srand(time()); 
     
    //set the number in (rand()%3); for however many links there are 
            $random = (rand()%3); 
    echo ("<a href = \"$urls[$random]\">$text[$random]</a>"); 
     
    ?>
    sigpic

    Comment

    Working...
    X