Hello all. I need some help with converting this javascript to php.
var unknownlinks=new Array()
unknownlinks[0]="http://google.com"
unknownlinks[1]="http://yahoo.com"
function unknownlink(){
parent.main.window.location=unknownlinks[Math.floor(Math.random()*unknownlinks.length)]
}
When this button is clicked it shows a random link in the iframe called "main":
<input type="button" name="button" value="button" onclick="unknownlink()">
Any simple way to eliminate the javascript and get the exact functionality with php code? Thanks a lot. 🙂