Drummin Posted June 21, 2012 Share Posted June 21, 2012 Probably time for a new look at your current code and explanation of what you are trying to do before continuing. Quote Link to comment https://forums.phpfreaks.com/topic/264531-image-path-issue/page/2/#findComment-1355970 Share on other sites More sharing options...
darkfreaks Posted June 21, 2012 Author Share Posted June 21, 2012 that loops through the whole array just not the images in that folder :-\ Quote Link to comment https://forums.phpfreaks.com/topic/264531-image-path-issue/page/2/#findComment-1355977 Share on other sites More sharing options...
Drummin Posted June 21, 2012 Share Posted June 21, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/264531-image-path-issue/page/2/#findComment-1355980 Share on other sites More sharing options...
darkfreaks Posted June 21, 2012 Author Share Posted June 21, 2012 fixed it left out the extra brackets. now i get it looped again. a whole bunch of times. Quote Link to comment https://forums.phpfreaks.com/topic/264531-image-path-issue/page/2/#findComment-1355990 Share on other sites More sharing options...
darkfreaks Posted June 22, 2012 Author Share Posted June 22, 2012 so i figured it out it must have been something i did to it because i overwrote the file with a clean version and it works so until the staff bring the topic solved button back Topic Solved! Quote Link to comment https://forums.phpfreaks.com/topic/264531-image-path-issue/page/2/#findComment-1355993 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.