Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The php code does not display jpegs in sequence 1

Status
Not open for further replies.

amir4oracle

Programmer
Nov 3, 2004
46
0
0
CA
The code below is written to display jpegs on abc.com of the type:
is.100.jpg to is.110.jpg

<?php
for ($i=100; $i <= 110; $i++)
echo "<img src=\"?>

but it only shows the red x instead of the image.
What can be done to fix this problem?
Your help is highly appreciated.
Thanks in advance
Amir Khan
 
IF I run that piece of code, it prints out:
Code:
<img src="[URL unfurl="true"]http://www.abc.com/is.[/URL][red]"[/red]100[red]"[/red].jpg>

I'm guessing those double quotes are not supposed to be there.

Try instead:

Code:
echo "<img src=\"[URL unfurl="true"]http://www.abc.com/is"[/URL] . $ i. "jpg>";


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
disregard previous code post. in reality is should be:
Code:
echo "<img src='[URL unfurl="true"]http://www.abc.com/is[/URL][red]." . [blue]$i[/blue] . ".[/red]jpg'>";
As i'm guessing you need the "." periods between is and $i variable and $jpg.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You are welcome. Glad I could help.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top