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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.