View Single Post
Old 08-13-2004, 05:56 AM   #3 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Yes, it would seem you only want to populate the $currentgallery array with the name.

edit: ^ I didn't word that very well. Basically you don't want to assign the found filenames in $currentgallery with an array key of $i (the current counter) because, like redhead said, you'll have an array full of holes.

When you loop through $currentgallery you may perform 5 loops, but the array keys may not necessary be 0,1,2,3,4.

So you can fix the array assignment, OR just use a foreach loop.

eg:

PHP Code:
foreach ($currentgallery as $k => $v) {
   
$result1 mysql_query("SELECT id FROM wp_piccaption WHERE picture = '$v'") or die(mysql_error()); 

idx is offline   Reply With Quote