random link

hello,
I would like to make something very simple for my site..
something like this

tutorial1 name link here
tutorial2 name link here
tutorial3 name link here

each time they refresh the same they change random places like this

tutorial2 name link here
tutorial3 name link here
tutorial1 name link here

can someone please help me do this?
SabrinAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
HuyBDConnect With a Mentor Commented:
or

$arr=array("link1","link2","link3");
then
$link=$arr[rand(0,sizeof($arr))];

HuyBD;
0
 
HuyBDCommented:
first, you add all to array

$arr=array("link1","link2","link3");
then
$link=$arr[rand(0,3)];


HuyBD;
0
 
SabrinAuthor Commented:
ohh im not that good at php could you please make it easier for me?
0
 
HuyBDCommented:
$arr=array("tutorial1 name link here","tutorial1 name link here","tutorial1 name link here");
$link=array_rand($arr,sizeof($arr));

for($i=0;$i<sizeof($link);$i++)
{
 echo $link[$i];
}

Hope this help

HuyBD;
0
All Courses

From novice to tech pro — start learning today.