ym_chaitu
0
Newbie Poster
Recommended Answers
Jump to PostHai
I have some html files and i would like to display them in a random manner using the php.
can any one help me out..I have been trying this one..
but it is not working..<?php $dir="./clock/"; $nimg="10"; $itype="html"; $rnumb=rand(1,$nimg); echo "<a href=".$dir."clock".$rnumb.".".$itype."></a>"; ?>
I have modified …
Jump to Posthai pal
this is not displaying any thing..
i have the code changed to this one..
then it is just showing me the link. where as i require the code to display the html file directly<?php $dir = "./clock/"; $arr_file_names = array(1=>'clock1.html','clock2.html','clock3.html','clock4.html','clock5.html','clock6.html','clock7.html','clock8.html','clock9.html','clock10.html'); $number_of_html_files = count($arr_file_names); $rnumb = …
Jump to Postits right, line17 should have been like this -
include("$dir".clock."$arr_file_names[$rnumb]");
All 10 Replies
network18
15
Practically a Master Poster
ym_chaitu
0
Newbie Poster
network18
15
Practically a Master Poster
ym_chaitu
0
Newbie Poster
network18
15
Practically a Master Poster
ym_chaitu
0
Newbie Poster
network18
15
Practically a Master Poster
ym_chaitu
0
Newbie Poster
ym_chaitu
0
Newbie Poster
network18
15
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.