Jump to content

image path issue


darkfreaks

Recommended Posts

See that's my point...  What is your current code and what are you trying to do?

The array building example I gave was based on a DB query using $modelID as the condition, which should result in building an array of images just for this model

 

IF this query is being nested within another query of "models" then this fact should be known and considered when building the array.  Probably just adding the modelID as a key like so would build an array for this task.

while($row=mysql_fetch_assoc($RecImage_query)){
			$images[$modelID][]=$row["imageFile"];
		}

Then your foreach loop would need to add this KEY like so.

 

<?php
foreach($images[$modelID] as $image){
echo "<td><img src='../cms/models/content/$modelID/$image' width='70' height='116' border='0'></td>";
}
?>

 

Again, a better explanation of what you're doing is needed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.