Hi there.
I have a problem: I want send every image to every div and display.
My code:

$files = glob("output/*.*");
for ($i=1; $i<count($files); $i++)
	$num = $files[$i];
	print $num."<br>";
	echo '<img src="'.$num.'" alt="random image" />'."<br><br>";


<img src="all.php" alt="image">

So, I don't know how to display multi image in index.php

Can you help me? thankz

Recommended Answers

All 6 Replies


<iframe src='all.php' > </iframe>



sorry, I want send every image to every div and display.
because, i won't design all.php, just store image.

But thank you for your help

I am still confused what is your exact requirement?
Why don't you directly write loop on index.php.
What is the use of all.php?

Dear Vibhadevit!

I've written loop in index.php before, but when you view source code, the image link like [folder/image.jpg].

I try to write code when you view source, the image link like [http://imagelink.jpg]. Can you help me?

I am just a beginner

$num = "/webroot/imagerfoldername/".$files[$i];

i'm very stupid, so can you explain?

i try you Urtrivedi but nothing happen

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.