Hello. i have a txtfile with about 300 words in it. currently seperated by a comma "word1,word2,word3," and i was wondering if it's possible in HTML or PHP to pick out at random from that txtfile 30 words and display then asweel as have the word link to someting like for example http://mypage.com/[word] i hope someone could help me ifthis is possible.
sure. this is easy <? $a=file_get_contents("thefile.txt"); $a=explode(",",$a); shuffle($a); foreach($a as $b){ echo"<a href=\"http://search.43.gs/$b\">$b</a> "; $n=$n+1;if($n==30){break;} } ?> Code (markup): enjoy.