using PHP inside HTML tags

BEGESSDULSE

New Member
I'm in the middle of learning PHP right now and I'm stuck on this:\[code\]<?php$links= array();links[0]="https://www.google.co.in/";links[1]="http://www.reddit.com/";$n= rand(0,1);$select= $links[$n];?><body> <a href="http://stackoverflow.com/questions/15727090/<?php echo $select; ?>">Random</a></body>\[/code\]I want the page to redirect to either google or reddit randomly, but I don't understand what the problem is. Any solutions?
 
Back
Top